Javascript runtime in Crystal?

Seems a lot of people are creating js runtimes in various languages. Bun for example, which is written in zig and supposedly super fast. Would a js runtime written in crystal be any faster? Faster than node itself?

Faster than what? Not sure how much effect on final performance the runtime environment actually has. After all, it all depends on the JS engine. That’s the crazy stuff where you need to optimize whatever it takes to squish out the last bit of performance. Neither Bun nor Node implement their own JS engine. They use JavaScriptCore and V8, respectively.

I’m sure you could build both a runtime and even an efficient engine in Crystal. But what’s the point? There are well-performing engines and runtimes out there. Why do you need another one? And I imagine it would be a lot of work to get anywhere near comparable performance as existing solutions.

1 Like

Only one way to find out! :smirk:

2 Likes