← Back to context

Comment by Dylan16807

8 hours ago

A hash lookup can be very fast. There's no reason for it to be slow when it doesn't need to invoke the fallback. JITs can't remove the slowest case but they can make the normal case very fast. Saying it can't be fast ever is a huge cop-out.

> Saying it can't be fast ever is a huge cop-out.

Maybe, but the world is still waiting for the counterexample. Python is simply not a runtime well-suited to optimization.

In the meantime, those of us who actually enjoy real HPC problems are using numba and rolling our eyes about all the confuffery around JITs. Maybe one will arrive that proves us wrong, but numba is fast today.

  • LuaJIT has the same dynamism with dictionaries and it's very fast at accessing them in JIT code.

    I don't have enough experience with PyPy to say much about it.