Step 1. Parsing
= Read the code
Parsing 과정동안 Abstract Syntax Trees (AST) data structure로 parse됨
Step 2. Compilation
Generated AST compiled to machine code
Step 3. Execution
machine code는 after compilation right away 바로 실행됨
due to JIT compilation
very unoptimized code in the begginning
-> optimization 과정을 거침 (during execution)
이 과정을 여러번 거치기도 함
각 최적화 과정 후에는 이전의 unoptimized code가 더 optimized된 코드로 바뀜 (without ever stopping execution)
그래서 V8이 속도가 빠른거임
이 과정은 main thread가 아닌 special thread에서 진행됨
'Programming > JavaScript' 카테고리의 다른 글
Scope and The Scope Chain (0) | 2022.11.17 |
---|---|
SCOPE CHAIN VS. CALL STACK (0) | 2022.11.17 |
Execution Contexts and the Call Stack (0) | 2022.11.16 |
What is a JavaScript Engine? (0) | 2022.11.15 |
Coding Challenge #1 - Developer Skills (feat. Problem solving) (0) | 2022.11.13 |