26
A 21,565X performance improvement in linting GraphQL
(grafbase.com)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
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!
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.
Cool. Good work!