4 ms·
Some interesting tidbits on python code and compilation performance 1) During AoC I mostly used cpython and numpy. One day my code was running too slow so I fi
by tails4e 4y ago
Some interesting tidbits on python code and compilation performance
1) During AoC I mostly used cpython and numpy. One day my code was running too slow so I fired up pypy. It ran even slower. Turns out numpy and pypy do not play well together in terms of performance.
2) I use matlab in work, and had some code that was slower than I liked, despite efforts to profile and optimise. I used the coder tool to compile it to C and got a 32x speedup. I was surprised, as matlab has a jit, so didn't expect a 32x performance delta, but there it is.
- jwilk 4y agoWhat's AoC?
- tails4e 4y agoAdvent of Code. Its a yearly coding challenge in December. Increasingly difficult problems each day, and an overall very fun way to brush up on algorithms or learn a new language.
- e12e 4y agoSee eg: https://news.ycombinator.com/item?id=29403522 https://news.ycombinator.com/item?id=29403522
- maxerickson 4y agoCython is good for little numpy shims.