• sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    8 months ago

    559.7ms

    So they optimized something from a half second to something in the microseconds. That’s certainly cool, but imo not the place to spend time optimizing. Especially since it’s probably mostly startup time, since the difference between the benchmark and bigger schema is 100ms in JS and 15x in Rust.

    When you say “fast JS runtime,” did you try bun? AFAIK, it is supposed to have way better startup time than V8.

    It’s certainly cool though!

    • yoavlavi@programming.devOP
      link
      fedilink
      arrow-up
      7
      ·
      8 months ago

      Thank you!

      We developed this for our platform and CLI (which are Rust based) which is a bit of a different use-case than a one-off manual run of a linter (in which the difference perhaps wouldn’t be as dramatic), although performant tooling for the end user should still be something we strive for IMO.

      The “fast JS runtime” was Bun in this case, which we tried specifically because it has faster startup (and we also use in our CLI as a runtime for user defined functions). Most people would be using Node which is much more popular and likely have an even slower startup time.