在 64 位操作系统的 64 位 CPU 上运行 X86-64 Python 是否有好处? [英] Are there benefits to running X86-64 Python on a 64-bit CPU in a 64-bit OS?

查看:27
本文介绍了在 64 位操作系统的 64 位 CPU 上运行 X86-64 Python 是否有好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行 Python 和扩展的 amd64 版本有什么好处?(许多扩展此处为 amd64 编译.)我有一个 i5 处理器和 Win764 位,所以它似乎是合适的.但听起来它也有缺陷、测试版、不受支持等.

What kind of benefits are there to running the amd64 builds of Python and extensions? (Lots of extensions compiled for amd64 here.) I have an i5 processor and Win7 64-bit, so it seems like it would be appropriate. But it also sounds like it is buggy, beta, unsupported, etc.

它真的提供了性能优势吗?在哪些领域?我会运行 SciPy、NumPy 等.我偶尔会在使用 32 位 Python 时遇到内存不足"错误,而我的机器有 4 GiB 的 RAM.

Does it actually provide a performance benefit? In which areas? I'd be running SciPy, NumPy, etc. I occasionally get "out of memory" errors with 32-bit Python and my machine has 4 GiB of RAM.

如果不存在 64 位版本的软件包,是否可以在 64 位 Python 基础上安装 win32 软件包?

Can win32 packages be installed on a 64-bit Python base if no 64-bit version of the package exists?

推荐答案

使用 64 位 Python 的主要理由是您可以访问超过 2GB 的主内存,例如如果您有大的字典、列表或长字符串.这要求您的系统中实际拥有那么多内存才能实用.

The primary rationale to use a 64-bit Python is that you can access more than 2GB of main memory, e.g. if you have large dicts, lists, or long strings. This requires that you actually have that much memory in your system to be practical.

次要效果是在 AMD64 模式下,CPU 有更多寄存器,因此生成的代码运行速度可能稍快(对于整数运算).

A secondary effect is that in AMD64 mode, the CPU has more registers, so the resulting code may run slightly faster (for integer operations).

Windows 上 64 位模式下的 Python 肯定不是测试版或不受支持.它可能有问题,但前提是您确实拥有非常大的数据结构.64 位 Python 已经有大约 15 年的历史了(虽然不是在 Windows 上).

Python in 64-bit mode on Windows certainly is not beta or unsupported. It may be buggy, but only if you actually do have very large data structures. 64-bit Python has been around 15 years (though not on Windows).

这篇关于在 64 位操作系统的 64 位 CPU 上运行 X86-64 Python 是否有好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆