4 ms·
I also do scientific computing, with scipy. The weave module allows me to write C code inline directly, it's great for optimizing away the bottlenecks. On the m
by ced 16y ago
I also do scientific computing, with scipy. The weave module allows me to write C code inline directly, it's great for optimizing away the bottlenecks. On the minus side, documentation is scarce, the error messages are worthy of template C++, and the idiosyncrasies suck.
Upside: I get 10-100X performance improvements!
http://www.scipy.org/PerformancePython http://www.scipy.org/PerformancePython
- joelthelion 16y agoNow imagine the same kind of performance improvement, without any complicated inline C, wrapping or any of that! I really have high hopes for PyPy :)
- StavrosK 16y agoYou can already do that, albeit in a somewhat more limited scope, with shedskin. I've had great success with it.
- ced 16y agoThat would be awesome. Right now, with Scipy arrays, you get pretty good performance if you use matrix operations and built-in functions. That can be unnatural, besides it would be more efficient to do a plain for loop in an ideal world. Is PyPy optimized for matrix-style code, for loops, or both? What about functional programming, say, finding the maximum of a user-supplied function? Will the maximizing and maximized functions be inlined for performance? Thank you to any answering PyPy developer :)
- pwang 16y agoUse Cython, then. It's my preferred way of writing C.