What is the accepted way to send 64-bit values over JSON?

There is in fact a limitation at JavaScript/ECMAScript level of precision to 53-bit for integers (they are stored in the mantissa of a “double-like” 8 bytes memory buffer). So transmitting big numbers as JSON won’t be unserialized as expected by the JavaScript client, which would truncate them to its 53-bit resolution. > parseInt(“10765432100123456789”) 10765432100123458000 See … Read more

How to compile x64 code with Visual Studio in command line?

You need to use a version of the cl.exe compiler which emits x64 code. Which one depends a bit on your setup. Let’s consider the case you’re on a 64 bit machine. For this you’ll need to use the compiler which lives at c:\Program Files (x86)\Microsoft visual Studio 10.0\VC\bin\amd64\cl.exe If you’re on a 32 bit … Read more

64bit Applications and Inline Assembly

Visual C++ does not support inline assembly for x64 (or ARM) processors, because generally using inline assembly is a bad idea. Usually compilers produce better assembly than humans. Even if you can produce better assembly than the compiler, using inline assembly generally defeats code optimizers of any type. Sure, your bit of hand optimized code … Read more

How can I use a single Visual Studio solution to build both x86 and x64 at the same time?

We do something similar to build core assemblies for .NET Compact Framework. Try this: <Target Name=”AfterBuild”> <MSBuild Condition=” ‘$(Platform)’ == ‘x86’ ” Projects=”$(MSBuildProjectFile)” Properties=”Platform=x64;PlatFormTarget=x64″ RunEachTargetSeparately=”true” /> </Target>

What are the advantages of a 64-bit processor?

There’s a great article on Wikipedia about the differences and benefits of 64bit Intel/AMD cpus over their 32 bit versions. It should have all the information you need. Some on the key differences are: 16 general purpose registers instead of 8 Additional SSE registers A no execute (NX) bit to prevent buffer overrun attacks