Hacker News new | ask | show | jobs
by peheje 3129 days ago
Cool. For anyone looking at using Python when speed is important should also take a look at Numba.
1 comments

Yes, numba is great; I've had a good experience with it for some functions.

Some problems aren't suited well for it though, especially those that involve Python dictionaries or sets. For those problems, switching to C++ results in MUCH faster code (std::unordered_map is way faster than Python's dict, especially for small elements).

As I'm aware of Python dictionaries are not supported by Numba, however it will still run in "object mode" which won't give you much performance boost. I tend to always specify the Numba function as njit or objectMode=False. But yea true, Numba does have shortcomings, maybe dictionaries and classes will be supported in the future.