←back to thread

160 points todsacerdoti | 4 comments | | HN request time: 0.001s | source
Show context
noname120 ◴[] No.41898858[source]
> I just don’t think we’ve exhausted all the possibilities of making JavaScript tools faster

Rewriting in more performant languages spares you from the pain of optimization. These tools written in Rust are somehow 100× as fast despite not being optimized at all.

JavaScript is so slow that you have to optimize stuff, with Rust (and other performant languages) you don't even need to because performance just doesn't bubble up as a problem at all, letting you focus on building the actual tool.

replies(6): >>41898915 #>>41898923 #>>41898937 #>>41898975 #>>41901141 #>>41901628 #
jvanderbot ◴[] No.41898937[source]
Someday soon I hope webasm gets another decent compiled language targeted for JS speedups. Something interoperable with JS.

For analogies, look no further than ASM in the early days and the motivations that brought us C, but with the lessons learned as well.

Rust is fine for this, except for interoperability.

replies(1): >>41898963 #
1. metadat ◴[] No.41898963[source]
It looks like Rust can interop with JS via WebASM?

https://stackoverflow.com/questions/65000209/how-to-call-rus...

replies(1): >>41899057 #
2. jvanderbot ◴[] No.41899057[source]
Of course that's why we're discussing it. I'm referring to stronger interop like how you can embed ASM in C, and therefore CPP.

Like a JS/TS that can have compiled blocks specified in the same language, preferably inline? I'm reaching here.

replies(1): >>41904650 #
3. peutetre ◴[] No.41904650[source]
But why use JavaScript at all if you can just compile it all to WebAssembly?
replies(1): >>41911629 #
4. wiseowise ◴[] No.41911629{3}[source]
Because I have better use of my time than waiting for 2 minute compile times on every little change. And believe it or not - I actually like JS with object destructuring, Promises and async/await.