3 ms·
There's also a wc in rust (of course) with more code (120 lines) but quite more efficient: https://medium.com/@martinmroz/beating-c-with-120-lines-of-rust-wc-a0
by bestouff 7y ago
There's also a wc in rust (of course) with more code (120 lines) but quite more efficient: https://medium.com/@martinmroz/beating-c-with-120-lines-of-rust-wc-a0db679fe920 https://medium.com/@martinmroz/beating-c-with-120-lines-of-r...
- ses1984 7y agoIn the blog post you linked, a library for parallelism is used.
- kbenson 7y agoIt's an additional two lines of code when they add it (and probably one more to pull it in above), and only happens at the end of the actual work, after they've matched C's performance and beat C's memory footprint. Using the parallelism library at the very end hardly invalidates the rest of the exercise.