A 21,565X performance improvement in linting GraphQL (grafbase.com)
from yoavlavi@programming.dev to rust@programming.dev on 02 May 11:52
https://programming.dev/post/13544558

#rust

threaded - newest

sugar_in_your_tea@sh.itjust.works on 02 May 13:59 collapse

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.dev on 02 May 16:22 collapse

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.

sugar_in_your_tea@sh.itjust.works on 02 May 16:39 collapse

Cool. Good work!