5 ms·
Yeah, let me just multithread and hand-optimize the piss out of this Go program until it's marginally faster than it would have been in C. Reminds me of the ar
by tuckerpo 7y ago
Yeah, let me just multithread and hand-optimize the piss out of this Go program until it's marginally faster than it would have been in C.
Reminds me of the argument that venison tastes better than beef. The argument roughly being, "If you shoot the deer right, drag it home right, gut it right, skin it right, tenderize it right and cook it _just_ right, it'll be _almost_ as good as store-bought frozen beef"
- rpmisms 7y agoVenison is generally much better-fed meat than grocery store cow.
- zik 7y agoTo be fair the author does say "it has since turned into a game of trying to take on the venerable wc with different languages". Of course the real message is that the original wc isn't particularly efficient and it can be beaten in many different languages - including C.
- ajeetdsouza 7y agoAuthor here. I think you should go through the article again. I think it's quite readable, and there are no "hand-optimizations" as you say. Also, the single-core implementation was already faster than the C version - the multithreaded version was only done to explore different methods of concurrency in Go. Hope that clarifies things.
- pjmlp 7y agoYeah, just like C developers used to do to try out beating Assembly programs coded by junior devs back in the 8 and 16 bit days. Funny how times change.
- aeyes 7y agoThe GNU tools have been hand optimized for decades! If there is performance left on the table, feel free to submit a patch! Just look at the amount of optimization that has gone into yes: https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes_so_fast/ https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes...