Does 64-bit Python have an advantage?

What is the advantage of using 64-bit Python over 32-bit? Would it be the performance?

Author: Maniero, 2020-05-31

1 answers

May even give some gain in some points when using 64-bit, but may be worse in others. The biggest reason to use the 64-bit version is to be able to access memory greater than 4GB.

The bits is addressing, so 2 raised to 32 gives just over 4 billion possible memory addresses, so that's the limit. 64-bit is 16 quintillion which is absurdly more than any computer will have even in the next century.

When using it it consumes more memory too, so it is not advantageous if it does not need much. And it should not use on machine that has no more than 4GB of memory, and can not install on operating system or architecture that is not 64 bits, and it is not very worth it if you do not need to use a lot of memory even if it is available.

Can complicate some things like garbage collection, some operations can cost more to do, so it only applies if it is very important.

But it is true that some instructions of processor that some calculations can be done faster, as long as it has been compiled thinking about it. It's not that your code will be faster, but the code from the libraries and runtime can run a little faster.

Does not change in other aspects and applies to any software, it is not something specific to Python.

 8
Author: Maniero, 2020-06-01 11:26:09