6 ms·
See also a different comparison (on ~the same problem) at StackExchange: https://codegolf.stackexchange.com/questions/188133/bentleys-coding-challenge-k-most-fr
by svat 4y ago
See also a different comparison (on ~the same problem) at StackExchange: https://codegolf.stackexchange.com/questions/188133/bentleys-coding-challenge-k-most-frequent-words https://codegolf.stackexchange.com/questions/188133/bentleys...
(Copying from my comment the last time this was posted: https://news.ycombinator.com/item?id=26467684 https://news.ycombinator.com/item?id=26467684)
There's also a nice book "Exercises in Programming Style" about just this problem.
- deleted 4y ago[deleted]
- igouy 4y agoSee also Doug Bagley's "The Great Computer Language Shootout" https://web.archive.org/web/20010616231931/http://www.bagley.org/~doug/shootout/bench/wordfreq/ https://web.archive.org/web/20010616231931/http://www.bagley...