Hacker News new | ask | show | jobs
by pizlonator 3779 days ago
ajross is right. People choose the languages they like regardless of performance.

JS perf is important to users though. Faster execution means fewer watts spent rendering and interacting with your favorite web page.

(Fun fact: B3's backend contains a machine description language that gets compiled to C++ code by a ruby script, opcode_generator.rb. We use Ruby a lot.)

1 comments

Why didn't you use JavaScript for that purpose (in a similar vein to how LuaJIT uses Lua for dynasm)?
I'm not a big fan of self-hosting. I like that you can build JavaScriptCore without using JavaScriptCore.
I wasn't really referring to self hosting. I was wondering whether it made sense to write tools like JavaScriptCore's offlineasm in JavaScript rather than Ruby (as LuaJIT does by using Lua for its dynasm tool). The LuaJIT build process actually builds a cut down copy for Lua for the purposes of running dynasm, which is then used to build parts of LuaJIT.
We spend time optimizing JavaScriptCore's build time. It's a hard problem and it's important when managing such a large project. People inevitably have to do clean builds and that sucks when you have >400k lines of C++ code.

So, naturally, we want to avoid building JSC twice. ;-)

Suppose that you are developing not to push this platform, but to simple do better on this platform. What does self-hosting gain you in that case?