15 ms·
> They’ve also compounded that velocity by writing most of the runtime in Typescript whereas our runtime is in C++ Can you explain more? Deno doesn't use types
by searchableguy 5y ago
> They’ve also compounded that velocity by writing most of the runtime in Typescript whereas our runtime is in C++
Can you explain more? Deno doesn't use typescript in the runtime. It is rust and pure js (for globals and wrapping bindings). I don't expect their current architecture to be any less efficient from what I know but it may have changed.
- vlovich123 5y agoYes you’re right. I assumed they’d use TS because they’re going through the effort of making it a first class citizen. Doesn’t matter though because it’s the same (the only way to run TS is to transpile to JS) https://github.com/denoland/deno/blob/main/runtime/js/README.md https://github.com/denoland/deno/blob/main/runtime/js/README... A good chunk of the runtime is in JS, snapshotted and loaded into each isolate. This is a greater memory overhead (and probably slower startup time) than having it written directly in Rust because the snapshot needs to be copied into each isolate. I assume Deno Deploy follows a similar model as Workers where you have many many isolates running concurrently within a process where this overhead may start to matter. If Deno Deploy gets some scale, I’m curious how they’ll tackle. Less interesting is if they start inlining a good chunk of that functionality into Rust. It’s much more interesting if they figure out some way to improve v8 to reduce this cost. There’s some ways potentially if you could create a COW clonable isolate in v8 efficiently and it could be interesting to collaborate with them on it. But that’s hard. Maybe they have alternate plans.