‹ BackHN Continuity

Thread

The JavaScript Midlife Crisis

56 points · 75 comments · maroun-baydoun

  1. msteffen · · focus · HN ↗
    Heterodox argument: a big part of the reason JavaScript has been so successful is that interpreted languages actually can be extremely fast—competitive with, and in many cases, faster than compiled languages, with V8 arguably the fastest interpreter in existence.

    See this post by Mike Pall, author of LuaJIT (which is comparable to or faster than V8 performance-wise, despite being basically a single-developer project), which explains why: <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20180603053407&#x2F;http:&#x2F;&#x2F;article.gmane.org&#x2F;gmane.comp.lang.lua.general&#x2F;75426" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20180603053407&#x2F;http:&#x2F;&#x2F;article.gm.... Basically, it’s much easier to add high-quality runtime-trace-aware recompilation to a JIT interpreter, which a non-trace-aware compiled language will often not be able to beat.

    1. suplexer · · focus · HN ↗
      There&#x27;s no need to even contextualize your argument, it is the reality. The whole point of spending such heroic efforts on a fast VM implementation is so that even faster peformance becomes a niche use cases.

      But alas, many unskilled programmers use Javascript to make useful things - sometimes beyond their ability. Even a state-of-the-art virtual machine like V8 cannot hope to fix that class of peformance problems.

      I will withhold my opinion on the &quot;faster than compiled languages&quot; part though. ;)

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.