A Tale of TurboFan: Four years that changed V8 forever
Inlining
Escape Analysis and Scalar Replacement
Making WebAssembly even faster: Firefox's new streaming and tiering compiler
Streaming compilation : Tier 1(or baseline compiler) and Tier 2 compiler
New bottleneck: CPU - main thread
Caching .wasm file
The Cost Of JavaScript
Bottleneck = Network(transmission size) + CPU(parse time)
JavaScript Startup Bytecode Cache
Optimizing hash tables: hiding the hash code
private symbol을 사용 -> symbol lookup이 필요
Backing store를 사용 -> lookup이 필요없게 되었다. 성능 향상!
: empty, array, dictionary
Fast Properties in V8
Named properties vs Indexed properties
Hidden classes and Descriptor arrays
In-object, fast, slow
Explaining JavaScript VMs in JavaScript - Inline Cached
Must-Watch JavaScript
In The Loop
Tasks - Animation callbacks - Microtasks
Tasks: 한번에 하나만 실행
Animation callbacks: 실행 시점에 큐에 있는 것은 모두 실행(실행 중 추가된 콜백은 다음번에 실행)
Microtasks: 큐가 빌때까지 계속 실행(따라서, 무한히 실행하는 것에 주의 필요)
자바스크립트와 이벤트 루프
Tasks, microtasks, queues and schedules
How JavaScript Timers Work
setTimeout vs setInterval
setInterval : 큐에 이전 핸들러가 실행되지 못하고 남아 있으면 새로 추가하지 않는다.
Elements kinds in V8
small integer -> PACKED_SMI_ELEMENTS
floating-point number -> PACKED_DOUBLE_ELEMENTS
regular element(string) -> PACKED_ELEMENTS
from PACKED to HOLEY
Avoid creating holes
Avoid reading beyond the length of the array
Avoid elements kind transitions
Prefer arrays over array-like objects
Avoid polymorphism
Bubbling and capturing
A cartoon guide to Flux
댓글 없음:
댓글 쓰기