February 20, 2016
One common issue that surfaces pretty often is the lack of full understanding of differences between 32-bit and 64-bit versions of AmiBroker among users. This article tries to explain some of the most important bits.
WHICH VERSION DO I HAVE?
To find out which version you have installed just go to Help->About window. It clearly says “32-bit” or “64-bit” in the About window.
OPERATING SYSTEM COMPATIBILITY
32-bit version of AmiBroker is compatible with BOTH 32-bit and 64-bit Windows.
64-bit version of AmiBroker is compatible with 64-bit Windows ONLY.
32-bit version running on 64-bit OS can fully utilize as much as 4GB of RAM for the program data.
The rest of RAM is used for OS, file system cache, system libraries, etc.
64-bit can theoretically use all RAM available but Windows itself has some limits (see Microsoft web pages for details)
More on OS system compatibility can be found here: http://www.amibroker.com/guide/compat.html
REGISTRATION / ACTIVATION KEY
There are separate activation keys for 32-bit and 64-bit version. The key for 32-bit version is ABReg.exe, while the key for 64-bit version is named ABReg64.exe. If you apply wrong key (32-bit key for 64-bit application or vice versa), you will not get any error message but the application will still show “Unregistered”. So make sure you apply 32-bit key (ABReg.exe) to 32-bit application and 64-bit key (ABReg64.exe) to 64-bit application.
Also note that 64-bit key is available only to those who registered “Professional Edition”.
32-bit version offers the widest selection of supported data sources (all listed here: http://www.amibroker.com/guide/h_quotes.html )
Many 3rd party data sources that are not listed above come in 32-bit only.
64-bit offers limited support for data sources due to the fact that 64-bit support requires 64-bit API from data vendor, and this is not always available.
For more information:
Typically if you put 3rd party data vendor DLL into “Plugins” directory and it does not show up in the data source list it means that its bitness is wrong (see below for more info).
Because of Windows OS limitations, 32-bit application is not able to load 64-bit DLLs and 64-bit application is not able to load 32-bit DLLs. In other words the “bitness” of application and DLLs must match. This has wide consequences with respect to plugins. Since plugins are just DLLs (dynamic load libraries), if you want to use a plugin you need to make sure it matches the bitness of your application. As majority of 3rd party plugins come only in 32-bit, so 32-bit version of AmiBroker offers widest selection of data plugin support.
FILE FORMAT COMPATIBILITY
We have put a lot of effort into making files compatible between 32-bit and 64-bit versions, so at the moment all formulas (AFL), project files (APX), all binary databases, layouts, watch lists are all 100% binary compatible between 32-bit and 64-bit versions, as long as they are smaller than 4GB. The only exception are DLLs (plugins) which are different for 32-bit and 64-bit as mentioned above.
Generally speaking 64-bit offers pretty much same performance as 32-bit version. The difference in speed is marginal. The only true advantage of 64-bit versions is ability to address more than 4GB of RAM and support larger data sets.
Contrary to ‘common sense’, 64-bit applications are not more precise. Due to Intel/AMD/Microsoft decision the support for extended double 80-bit floating point (x87 FPU) has been dropped in 64-bit compilers and replaced by less accurate 64-bit floating point SSE2 for sake of speed. That is why you may see some speed up in 64-bit application. 32-bit code computes all results with internal 80 bit accuracy due to the use of 80 bit FPU unit. 64-bit does so with at most 64-bits. Also the ‘old’ x87 FPU handles way more instructions in hardware (like transcendentals), while new SSE2 only has basic math and all more complex functions are implemented in runtime library. While we are building both versions from the very same C/C++ source code and are striving to provide same results from all functions, these architectural differences can cause that output of 32-bit version is more precise.
More on floating point arithmetic can be found here: https://www.amibroker.com/kb/2010/07/20/about-floating-point-arithmetic/