-
Notifications
You must be signed in to change notification settings - Fork 1k
Performance comparison of generated binary vs running through node #74
Comments
As far as I understand result bin contains node altogether with cached code data produced by https://nodejs.org/api/vm.html#vm_class_vm_script. Am I right? It would be nice to have a little info related to implementation details. |
I benchmarked this for an Express-based web app with Node 8.0.0 and found that the compiled version was 31% slower than the plain version under Crankshaft. With Ignition+TurboFan the difference was only 1.4%. More info: https://github.com/rla/pkg-express-benchmark |
Good job, @rla! I will try to address that slowdown. |
@rla. Pkg defaults to stripping the source code of root package ( I am sure the results will get much better if you make pkg put the source of |
@igorklopov, I have updated the benchmark. With source included the difference for Crankshaft decreases to 1.1%. I would be nice if this gets documented in README otherwise users would be throwing away over 30% of performance if they hit similar conditions (no |
Right! Thanks! 👍 |
Closing this as stale 🙏 Thank you anyway! |
I suppose running the binary instead of node with js files will be slow as v8 makes many optimizations which may not be possible at compile time. Are their any statistics of how slow this compiled code runs in comparison to the default interpretted (JIT) way running node apps
The text was updated successfully, but these errors were encountered: