Will still be many times faster than either pyrex or psyco will get you assuming the c utility 的速度会比pyrex和psyco都快很多倍(当然,假设可以使用c工具
Because the module runs slowly , maybe pyrex would be a good candidate for speeding it up 由于这个模块的运行速度很慢,可能pyrex会是一个比较好的加速方法。
This pyrex function just barely differs from pure python - just a few declarations added 这个pyrex函数与纯python的程序只有很少的不同:只是增加了几个声明:
For " normal " pyrex users , however , there is no reason to modify the generated c module 然而对于“普通的” pyrex用户来说,没有什么理由需要修改所生成的c模块。
Of course , psyco only works on x86 platforms , whereas pyrex will work anywhere that has a c compiler 当然, psyco只能用于x86平台,而pyrex可以在具有c编译器的所有环境上执行。
Is certainly not identical to those functions that can benefit from pyrex , but there is certainly some overlap 的涵盖面当然与可以利用pyrex的函数不同,但是肯定会有一些重叠。
I have just declared some variable types that i clearly know , and i used the cleanest pyrex counter loop 我只声明了早已知道的一些变量类型,并使用最干净的pyrex counter循环。
Of course , when you start talking about making python - like modules fast , pyrex is not the only tool there is 当然,当您开始谈论加速(类) python模块时, pyrex并不是惟一可用的工具。
I might be able to squeeze a little bit out of concatenating pyrex c strings rather than python string objects , too 我可能需要使用pyrex / c的字符串连接操作,而不是python的字符串对象。
In well - chosen cases , a pyrex module can run 40 - 50 times faster than a python version of the same module 在仔细选择的情况中, pyrex模块的速度可以比python版本的相同模块的运行速度快40到50倍。