|
Psyco is a specializing just-in-time compiler for Python originally developed by Armin Rigo and further maintained and developed by Christian Tismer. Psyco runs on BSD-derived operating systems, Linux, Mac OS X and Microsoft Windows using 32-bit Intel-compatible processors. Psyco is written in C and generates only x86-based code. A follow-up project to Psyco is PyPy, which incorporates an interpreter and a compiler that can generate C, improving its cross-platform compatibility over Psyco. Both parts are written in Python, but the interpreter is restricted to a subset of Python, called RPython. ==Speed enhancement== Psyco can noticeably speed up CPU-bound applications. The actual performance depends greatly on the application and varies from a slight slowdown to a 100x speedup.〔(【引用サイトリンク】title=Python Psyco benchmarks )〕〔(【引用サイトリンク】title=Python Psyco Homepage at sourceforge )〕〔(【引用サイトリンク】title=A beginners guide to using Python for performance computing at scipy.org )〕〔(【引用サイトリンク】title=Charming Python: Make Python run as fast as C with Psyco )〕 The average speed improvement is typically in the 1.5-4x range, making Python performance close to languages such as Smalltalk and Scheme, but still slower than compiled languages such as Fortran, C or some other JIT languages like C# and Java.〔(【引用サイトリンク】title=Boxplot Summary )〕 Psyco also advertises its ease of use: the simplest Psyco optimization involves adding only two lines to the top of a script: These commands will import the psyco module, and have Psyco optimize the entire script. This approach is best suited to shorter scripts, but demonstrates the minimal amount of work needed to begin applying Psyco optimizations to an existing program. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Psyco」の詳細全文を読む スポンサード リンク
|