logoalt Hacker News

VorpalWayyesterday at 7:16 PM1 replyview on HN

I would expect the standard library of various languages to provide an optimised implementation such as this. Then everyone downstream benefits, and benefits from future improvements when compiled for a newer version of the language / executed under a newer version of the runtime.

You see this in rust, where they replaced the hash tables many years ago, the channel a couple of years ago, and most recently the sort implementations for both stable and unstable sort. I expect other languages / runtimes do similar things over time as well as CPUs change and new approaches are discovered.


Replies

leni536yesterday at 8:16 PM

I wouldn't. This is very specialized to the type of the elements.

show 1 reply