The rescript compiler appears to compile faster than anything with similar type complexity, i.e. Rust, Jsoo, Scala, Haskell. (esbuild feels faster, but esbuild mostly just strips away TS type signatures).
What is the rescript compiler giving up by compiling so fast? What is being sacrificed ?
The rescript compiler appears to compile faster than anything with similar type complexity, i.e. Rust, Jsoo, Scala, Haskell.
For sure rescript language is more simple and has less constructs than any of those, that’s where the speed comes from, combined with the fact that Rescript syntax is closer to js, so compilation has less complexity than rust to native code, or Scala to java bytecode, also being writtern in OCaml allows some degree of speed.
I think we did not give up too much compared with alternatives.
The performance mostly came from vertical integration, when the build system, compiler, library comes from a single mind with performance in mind, it will be significantly faster than alternatives. It is a pity most language developers don’t care performance that much.
I am toying around a new language with wasm backend support, it only took 28ms (cold start) to type check 6 packages (no parallelism employed yet). Modern CPUs are fast to do lots of things within milliseconds.
Wait, a new language? What’s going to happen to ReScript?
(And how about wasm backend for ReScript? )