4 ms·
A factor of two doesn't sound that great actually. You can get similar speedups by "compiling" an arbitrary python module using cython. Of course you can usual
by ngoldbaum 11y ago
A factor of two doesn't sound that great actually. You can get similar speedups by "compiling" an arbitrary python module using cython. Of course you can usually do much better than a factor of two if you think carefully about type annotations and CPython overhead.
- gtaylor 11y ago> A factor of two doesn't sound that great actually. A factor of two sounds great to me, especially if he didn't have to write Cython-specific code. That's a nice, easy win with a noticeable impact.
- fijal 11y agoit's a factor of two without thinking too hard. You can probably optimize it for pypy too which will get you more benefit. If it's "just" dict lookups there is not really all that much there is to win using cython for example