Node JS: Event Loop

Despite being single threaded, Node-Js allows asynchronous programming and non-blocking operations by using Event loop. Node has an event driven architecture and code is executed is in the form of callbacks. The Event Loop schedules the callbacks to be run in the single thread at a given point. Libuv is the library that provides the implementation of event loop and thread pool in Nodejs. When a node process starts execution, the top level code is executed first, and all the callbacks are registered....

October 14, 2021 · 6 min · Me

JS Engine And Execution Context

Javascript engines are programs that convert Javascript code into native machine code. These engines are embedded into the browser for runtime compilation and execution of the code. Google chrome uses V8 engine, Safari uses JavaScriptCore, and Firefox uses SpiderMonkey. To transform and run code faster, modern javascript engines use Just In Time (JIT) compilation, which is a combination of both interpretation and compilation. How JS Engine Works ​ Parser...

August 15, 2021 · 4 min · Me