dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.24k stars 1.57k forks source link

VM: Implement on-stack replacement in bytecode interpreter #36887

Closed alexmarkov closed 4 years ago

alexmarkov commented 5 years ago

Currently, we switch from interpreting a method to executing compiled code only when entering a method. If method has long-running loops it may take significant time to interpret it.

In order to improve performance in such cases, we need to implement

This is one of the reasons why NavierStokes and NavierStokesTyped benchmarks are slower with interpreter compared to bytecode JIT (which is on par with default mode). These benchmarks don't have a proper warm-up outside of measurements and they have a method with long-running loops (FluidField.lin_solve).

/cc @rmacnak-google @crelier @a-siva

alexmarkov commented 4 years ago

Bytecode mode is removed from Dart VM.