Python 64 bits have advantage?

Asked

Viewed 178 times

8

What is the advantage of using 64-bit Python over 32-bit Python? It would be performance?

1 answer

9


It can even give some gain in some points when using the 64 bits, but can 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 are addressing, so 2 to the 32 gives just over 4 billion possible memory addresses, so that’s the limit. 64 bits is 16 quintillions which is absurdly more than any computer will have even in the next century.

When you use it it consumes more memory too, so it’s not advantageous if you don’t need much. And you shouldn’t use it on a machine that has no more than 4GB of memory, and you can’t install it on an operating system or architecture that isn’t 64 bits, and it’s not really worth it if you don’t need to use a lot of memory even if it’s available.

It can complicate some things like garbage collection, some operations can cost more to do, so it only counts if it’s very important.

But it is true that it may become available some processor instructions that some calculations can be done more quickly as long as it has been compiled thinking about it. It’s not that your code will be faster, but the library code and Runtime can run a little faster.

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

  • Thanks Maniero for the explanation! It’s how I imagined the 64bit architecture only has relevance in case of demand for a lot of RAM!

  • @Pinheironeto now you can vote for everything on the site also.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.