Deno uses v8 to execute javascript but considering the fact that it directly runs typescript, I'm wondering if there is a performance penalty because of it or not.
It seems it compiles the code only for the first time. So is it possible to compile as a deployment step and avoid the startup overhead related to compilation?
Is there any other aspect in performance comparison between node.js and Deno?
Deno keeps track of some key performance metrics here: https://deno.land/benchmarks
As far as pre-compilation, it's on the roadmap and tracked in this issue: https://github.com/denoland/deno/issues/986
(an answer to the 2nd paragraph)
Deno stores the compiled assets in DENO_DIR. You can check it with the command "deno info". If you deploy the entire DENO_DIR as well as your source code, you can avoid the TypeScript compilation at the startup time.
You can also change the location of DENO_DIR by setting the DENO_DIR environmental variable.
DENO_DIR=/path/to/your_deno_dir deno run entrypoint.ts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With