Hacker News new | ask | show | jobs
80x Faster Rust Code? (github.com)
4 points by choiway 2189 days ago
1 comments

> I'm still suprised by how much faster the Rust code given that it's not taking advantage of concurrency.

Dynamically-typed language with a GC, executing scripts via an interpreter will always be slower against a compiled, statically-typed language with no GC.

Unfortunately, this comparison is sort of unfair and is frankly "optimization" by using another language.

It’s not as simple as a dynamic language - python code which is heavily using things which are implemented in C will typically have much less margin. In this case, they’re comparing a Pandas dataframe to a much less complicated HashMap and I’d expect a large fraction of the delta to be related to all of the extra magic in Pandas — which is a great cue to ask whether you need that since you’re definitely paying for it.