python - 将 Psyco 移植到 64 位时可能存在哪些缺陷?

标签 python c 64-bit porting psyco

Psyco 文档说:

Just for reference, Psyco does not work on any 64-bit systems at all. This fact is worth being noted again, now that the latest Mac OS/X 10.6 "Snow Leopart" comes with a default Python that is 64-bit on 64-bit machines. The only way to use Psyco on OS/X 10.6 is by recompiling a custom Python in 32-bit mode.

一般来说,将程序从 32 位移植到 64 位只有在代码假定指针类型有一定大小和其他类似的小问题时才是真正的问题。考虑到 Psyco 不是一大堆代码(~32K 行 C + ~8K 行 Python),它有多难?有没有人试过这个并撞墙?我还没有真正有机会仔细查看 Psyco 源代码,所以如果我知道我是否在浪费我的时间来研究这个,我真的很感激......

最佳答案

Christian Tismer,其中一位 Psyco 开发人员似乎也不同意“它有多难”- 假设(引自 here):

Needs to come to x86-64? Why that! Seriously, I would love to do that, but this would be much harder than anybody would expect. Due to the way psyco is written, it would be really half a rewrite to releave it from its 32-bitterness. The 32 bit assumption is implicitly everywhere. It would be straight forward, if the memory model was all 64 bit. But no intel platform is that simple. so long, and thanks for all the fish -- chris

hum. It would cost at least 3 or 4 months of full-time work do do that, if not more. I doubt that I can get sponsorship for that.

如果您想要更多详细信息(可能需要 Psyco 的坚实内部知识),我想您总是可以尝试在其中一个 psyco 邮件列表上提问...

关于python - 将 Psyco 移植到 64 位时可能存在哪些缺陷?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2374233/

相关文章:

c++ - main() 在 C 和 C++ 中应该返回什么?

c# - NUnit:是否可以从我的应用程序中引用类?

C - 在整数中存储一个 int 指针

python - sys.argv[0] 总是什么都不返回

c - 在 c 中为浮点变量生成整数输出

c - 检测父进程死亡

javascript - 通过 JSON 发送 64 位值的公认方式是什么?

python - gunicorn 在源更改时自动重新加载

python - Pyplot axvspan : Multiple colors in one span (vertically)

python - 使用 Python cgi 和表单进行工作。空输入错误