Programming Tips πŸ’‘
51.5K subscribers
67 photos
10 videos
30 files
354 links
Programming & AI:
Tips πŸ’‘
Articles πŸ“•
Resources πŸ‘Ύ
Design Patterns πŸ’Ž
Software Principles βœ…

πŸ‡³πŸ‡± Contact: @MoienTajik

🎯 Buy ads: https://telega.io/c/ProgrammingTip
Download Telegram
How JavaScript works: inside the V8 engine + 5 tips on how to write optimized code ⚑️

A JavaScript engine is a program or an interpreter which executes JavaScript code. πŸŒ€

A JavaScript engine can be implemented as a standard interpreter, or just-in-time compiler that compiles JavaScript to bytecode in some form. βœ…


Why was the V8 Engine created❓

The V8 Engine which is built by Google is open source and written in C++. ✨

This engine is used inside Google Chrome. Unlike the rest of the engines, however, V8 is also used for the popular Node.js runtime.πŸ’Ž

V8 was first designed to increase the performance of JavaScript execution inside web browsers. πŸ’¨

In order to obtain speed, V8 translates JavaScript code into more efficient machine code instead of using an interpreter.πŸ’₯

It compiles JavaScript code into machine code at execution by implementing a JIT (Just-In-Time) compiler like a lot of modern JavaScript engines do such as SpiderMonkey or Rhino (Mozilla). 🦊

The main difference here is that V8 doesn’t produce bytecode or any intermediate code. ❌


https://t.me/pgimg/160

[ Article ] : kutt.it/js-md2

γ€°γ€°γ€°γ€°γ€°γ€°
#JavaScript #Internals #V8
@ProgrammingTip