News for hackers. Stuff that matters.
Re:How we made Haskell search strings as fast as Rust by staticassertion on Wednesday March 13, 2019 @05:35PM (#19384112)
> Firstly, the program spends most of its time in the heavily-optimized str.find function, which is implemented in C.

I'm not going to outright call this "cheating", but most of the time, virtually unconditionally, when Python is fast it's because it isn't Python, it's C.

It definitely feels worth noting that Python is radically slower than other languages, and the main "tool" it provides for improving performance is to rely on another language entirely.

Re:How we made Haskell search strings as fast as Rust by zie on Wednesday March 13, 2019 @07:05PM (#19384872)
Well Python is written IN C, at least the standard version is, so I really wouldn't call it anywhere near cheating... :).

But I don't disagree that the Python owe's it's performance to C.. it owes everything to C :)

Re:How we made Haskell search strings as fast as Rust by staticassertion on Wednesday March 13, 2019 @09:23PM (#19385715)
I think there's a very big difference between the runtime being implemented in C and the libraries being implemented in C.
Re:How we made Haskell search strings as fast as Rust by blattimwind on Thursday March 14, 2019 @08:16AM (#19388514)
Example Java: Runtime written in C++, practically all libraries written in Java, including the standard library, and Java libraries are greatly preferred.