News for hackers. Stuff that matters.
Re:Go is 17 times more sustainable than Python by steveklabnik on Saturday February 18, 2023 @01:29PM (#34849563)
The largest one is that it is measuring benchmark game programs. There is no reason to believe that those style of programs are representative of all programs.

Furthermore, there’s very weird results as well. Why is TypeScript so much worse than JavaScript? TypeScript is a superset of JavaScript and compiles to it. The JavaScript program could be exactly the same as the TypeScript one, but isn’t for some reason.

It’s been a while and I’m on my phone so I can’t check, but IIRC the reason the above is even a question is that they made a benchmarking framework but didn’t share it, so nobody can reproduce their results.

Re:Go is 17 times more sustainable than Python by vorpalhex on Saturday February 18, 2023 @01:33PM (#34849612)
> Why is TypeScript so much worse than JavaScript? TypeScript is a superset of JavaScript and compiles to it

Typescript produces garbage JS output that creates all sorts of weird bugs, hiccups and strange quirks. It doesn't surprise me that TS generated JS would perform much worse than directly written JS.

Re:Go is 17 times more sustainable than Python by steveklabnik on Saturday February 18, 2023 @01:38PM (#34849652)
Even if you take a JavaScript file and run it through tsc, it adds stuff? That is indeed surprising to me!

It wouldn’t shock me that there were differences if you used a bunch of fancy TypeScript features, but at the limit I would expect no overhead if you don’t use any of them. Maybe that expectation is misguided.

Re:Go is 17 times more sustainable than Python by rcme on Saturday February 18, 2023 @03:31PM (#34850769)
It depends on your compiler settings but the code can very closely match equivalent JS if you want.
Re:Go is 17 times more sustainable than Python by Rochus on Saturday February 18, 2023 @04:11PM (#34851135)
These are not "serious methodological flaws"; you do not consider the results credible, which might be justified or not, it's an opinion.