[컴][웹] Launching Ignition and TurboFan 번역


Launching Ignition and TurboFan

Launching Ignition and TurboFan 의 내용을 대략적으로 번역했다.

JavaScript execution pipeline

새로운 자바스크립트 수행 파이프라인
  • - Ignition : V8’s interpreter
  • - TurboFan : compiler
v5.9 부터 2010년부터 사용해온 Full-codegen 와 Crankshaft 를 더이상 사용하지 않가로 함.

TurboFan

TurboFan 은 처음 디자인할 때부터 ES2015 이후의 기능(feature) 에 대한 최적화도 고려했다.

터보팬은 layered compiler design 을 도입했다.
high-level 과 low-level compiler optimizations 을 분리해서 새로운 언어기능(language features) 을 추가하기 쉽게

명확한 명령어 선택 컴파일 phase(explicit instruction selection compilation phase)를 추가해서
구조와 덜 연관된 코드를 만들 수 있게 해준다.

Ignition

Ignition interpreter 의 최초의도는 모바일기기에서의 메모리 사용을 줄이기 위함이었다.

이전에 Full-codegen baseline compiler가 생성한 코드는 크롬에서  평균 javascript heap 의 1/3을 차지했다.

그래서 어플리케이션의 실제 데이터가 사용할 수 있는 공간이 적었다.

후에 V8팀은 TurboFan 을 이용해서 Ignition의 bytecode를 바로 최적화된 machine code 로 바꿀 수 있는 사실을 이용했다.

소스코드를 다시 컴파일을 해야만 했던 Crankshaft

Ignition의 bytecode는 v8에서 좀 더 깔끔하고 덜 error-prone 한 기준선(baseline)을 제공한다.
 Full-codegen의 baseline compiled code를 생성하는 것보단 bytecode 를 생성하는 것이 더 빠르다.

그래서 ignition을 사용하게 되면 script startup 시간과 웹페이지 로드 속도가 빨라진다.

See Also

  1. Digging into the TurboFan JIT 번역
  2. Firing up the Ignition interpreter
  3. V8 에서 JavaScript 의 pipeline
  4. V8 관련 글들

References

  1. Launching Ignition and TurboFan

댓글 없음:

댓글 쓰기