DEV Community

Discussion on: 🔥 What's Hot in Web Development? — Weekly Picks #143

Collapse
 
hugosantiagobecerraadan profile image
Hugo S. Becerra Adán • Edited

Go uses AOT compilation and can be used to obtain an executable object file, that when created with static linking produces a large file, just the same way as C/C++ compiles static executables. A static executable file just means that all dependencies are included inside the file, no shared libraries are requires to execute the file. But it does not means it will consume more RAM for that reason.
VMs just execute bytecode, and by nature a VM always consumes more resources than native binary code.
V8 is not a VM but does not produces executable files either. It parses the JS files to obtain a bytecode of the AST that is used in a JIT compiler to create native code and execute it at the moment. V8 take several steps: parsing, analyzing, compiling and executing, and those steps are always going to consume more resources than just executing native code.