Figure 2
C++ (a) and Python (b) interfaces for PHENIX code. The two code samples use as similar a syntax as is permissible by the constraints of the respective languages, yet the first is compiled and the second interpreted. There is a performance penalty associated with running a scripting language. However, because the majority of the time is spent in the compiled C++ routines, the execution times for the two interfaces are roughly equivalent on all platforms tested. |