News for hackers. Stuff that matters.
Re:Ruby Outperforms C: Breaking the Catch-22 by umvi on Saturday September 09, 2023 @03:02AM (#37442921)
Golang's compiler is so fast though that I can iterate much faster so I'm willing to accept slightly worse performance than C++. C++ I waste so much time just waiting (esp. if I'm using a lot of templatized header only libraries)
Re:Ruby Outperforms C: Breaking the Catch-22 by john_the_writer on Saturday September 09, 2023 @03:09AM (#37442953)
But by that logic ruby is faster still since the compile time is 0. Less than zero really because it can be modified in flight.
Re:Ruby Outperforms C: Breaking the Catch-22 by fredrikholm on Saturday September 09, 2023 @03:27AM (#37443053)
The trade offs between the two are huge.

Go programs compile in less than a second, or several seconds for huge projects, where idiomatic Go gets you within the same order of magnitude to that of C(++), with some memory overhead. Concurrency is first class, GC pauses exist but are seldom an issue.

Idiomatic Ruby runs several orders of magnitude slower, with a huge memory overhead, and is rife with runtime gymnastics. Concurrency is an expensive hack, with stop-the-world GC.

Re:Ruby Outperforms C: Breaking the Catch-22 by Mawr on Saturday September 09, 2023 @05:07PM (#37450297)
Only if the compilation speed difference is worth the loss of performance. That seems unlikely for most use cases because the speed gain is small while the performance loss is severe.