3 ms·
In theory, Node is faster than Python due to this, among other things. In practice, I have seen Node apps blocking or crashing far more often than Python apps,
by sgarland 3y ago
In theory, Node is faster than Python due to this, among other things.
In practice, I have seen Node apps blocking or crashing far more often than Python apps, which drags the performance down just a bit.
In the meantime, @njit decorator on Python functions, and boom, done.
- pjmlp 3y agoI am yet to see such thing, to each its own I guess. @njit doesn't work in regular Python, requires installing Numba and only works in very specific use cases.
- sgarland 3y agoWell yes, it’s not native, but the point was that it’s very simple to use (and install). As to specificity, I’d argue that it works on the things which stand to benefit the most from it. Parallelizing loops, vectorizing, etc.
- FridgeSeal 3y agoFor those playing at home wondering why you can’t just do this on all Python loops: The numba jit is for numerical code. You won’t magically get better performance iterating over a bunch of things you get back from your db for example.