Hacker News new | past | comments | ask | show | jobs | submit login
TurboWarp – Run Scratch projects faster (turbowarp.org)
28 points by OuterVale 7 days ago | hide | past | favorite | 7 comments





This thing compiles scratch to Javascript with a claimed 10 to 100 speedup. Here's a bit from the docs on how it works. https://docs.turbowarp.org/how

And here's the source. https://github.com/TurboWarp/

From the doc and a quick glance at the repo it looks like it's scratch modified to compile to javascript. No surprise that you can't live edit, at least not for now.


It is kind of ironic that in this scenario JavaScript is seen as really blazing performance.

I wasn't aware the Scratch implementation is that slow.


JS is not slow; remember that big JS engines are stupidly optimized.

It kind of is, when compared with native compiled languages, hence why rewriting JavaScript tooling is the new fashion is JS world.

You're underestimating the insane amount of engineering effort Google has put into optimizing V8. Take a look at some benchmarks.

https://programming-language-benchmarks.vercel.app/javascrip... https://programming-language-benchmarks.vercel.app/javascrip... https://programming-language-benchmarks.vercel.app/javascrip...

It beats Java and C# in many of them, and for C++ it's usually not more than 5x slower.

Of course, that's all optimized JavaScript. It's a lot easier to slip up and accidentally make your code much slower in a scripting language than in a compiled language. So yeah, for larger programs it's definitely worth rewriting.


If you run the benchmarks longer (i.e. more than a couple hundred milliseconds - the above benchmarks use validation values from the original benchmarksgame, not the ones used for evaluating performance), you will see a different picture:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/... (and this is, by far, the most favorable comparison for Node.js you can make, where it can trade punches but ultimately ends up losing)

Sure, V8 is impressive, but there is no free lunch especially when your optimization target is a dynamically typed, initially interpreted, language.


You obviously don't know my comment history regarding dynamic languages and JIT compilers.

If only CPython was half as fast as V8, or if PyPy wasn't a black swan in the community.

Still doesn't change the point I made.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: