News for hackers. Stuff that matters.
Re:The Green Side of the Lua by qsort on Thursday May 28, 2026 @04:10AM (#48306097)
I don't know what this table is supposed to measure but it doesn't check out.

(C, C++) and (JS, TS) are almost source-compatible, chances are you can rename test.c to test.cpp and test.js to test.ts and you're done. Yet they're showing massive differences?

Also most of the compiled languages with no runtime should get results that are very close to each other: good compilers should produce similar object-code for this type of microbenchmark.

Not to mention this is really measuring the implementation, you can't measure a language. Mike Pall wouldn't be down there, and JS/TS wouldn't be up there without V8 and friends.

Re:The Green Side of the Lua by atiedebee on Thursday May 28, 2026 @04:22AM (#48306182)
I imagine you would want to test "idiomatic" code for these comparisons. It doesn't make much sense to compile with C++ and write everything in C.
Re:The Green Side of the Lua by Capricorn2481 on Thursday May 28, 2026 @05:14AM (#48306532)
That doesn't explain why Typescript is insanely less efficient.