News for hackers. Stuff that matters.
Re:Beating C with 70 lines of Go by tuckerpo on Wednesday November 20, 2019 @04:28PM (#21588732)
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"

Re:Beating C with 70 lines of Go by ajeetdsouza on Wednesday November 20, 2019 @05:10PM (#21589137)
Author 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.

Re:Beating C with 70 lines of Go by aeyes on Wednesday November 20, 2019 @05:47PM (#21589474)
The 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...

Re:Beating C with 70 lines of Go by pjmlp on Wednesday November 20, 2019 @05:42PM (#21589420)
Yeah, 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.

Re:Beating C with 70 lines of Go by zik on Wednesday November 20, 2019 @04:51PM (#21588956)
To 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.
Re:Beating C with 70 lines of Go by rpmisms on Wednesday November 20, 2019 @04:43PM (#21588878)
Venison is generally much better-fed meat than grocery store cow.