5 ms·
> Lars Bak was of course hired by Google to build V8, which was released in 2008. Within a few years, most of the techniques pioneered in Self had made their wa
by munificent 4y ago
> Lars Bak was of course hired by Google to build V8, which was released in 2008. Within a few years, most of the techniques pioneered in Self had made their way into the major JS engines.
Sort of coming full circle: After working on V8 for many years, Lars pitched Google on the idea to build a new language and VM. They felt they'd started to hit the wall with how fast they could make V8 because of JavaScript's fundamentally mutable nature.
That became Dart and one of the reasons they believed the Dart VM would significantly outperform JS VMs was because even though Dart 1.0 was essentially dynamically typed, it was class-based, and the inheritance hierarchy and field set of each class are fixed. Therefore, you don't need all of the clever "hidden class" optimization tricks they invented way back then.
- keewee7 4y agoSome of the Danish people behind V8 and Dart are now working on the impressive Toit language for embedded IoT: https://github.com/toitlang https://github.com/toitlang
- pjmlp 4y agoThey left Dart after the whole DartiumVM failure and the pivot into Dart 2.0 with strong typing. You'll notice that Toit is also dynamically typed.
- rileyphone 4y agoBased on https://mrale.ph/dartvm/ https://mrale.ph/dartvm/, it looks like there are two way Dart gets optimized now - either through a JIT like V8, or AOT compilation with a fallback for the methods that can't be devirtualized. The JIT still performs better, but the AOT code starts up faster. The next challenge is to combine them and eliminate cold starts with dynamic optimization.
- mraleph 4y ago> The JIT still performs better, but the AOT code starts up faster. I should update that side note because a lot of things has changed. It should probably say something like: > Theoretically, Dart VM JIT should have best peak performance, while Dart VM AOT has best startup time. In reality the comparison is quite complicated. AOT has seen a lot of work in the last few years, which made it faster than JIT in some aspects e.g. both direct and highly polymorphic method calls are usually faster in AOT. JIT's peak performance has been languishing in a state of neglect, but it still runs circles around AOT in some cases due to aggressive inlining. Something like this.