Web Languages and VMs or why fast code is always in fashion Lars Bak & Kasper Lund Software Engineers at Google Inc. Hacking on VMs side by side the last 13 years... Speed fuels application innovation Web browsers are faster than ever, but are they fast enough? We will convince you that Dart takes performance to the next level So Why Are We Here? Remember the Browsers of 2006? Firefox Explorer Opera Safari 1998 2000 2002 2005 2008 2006 Browsers were believed to be "fast enough" ●Web apps like Gmail and Google Maps ran fine ●JavaScript was inherently too slow for heavy client putations ●JavaScript execution was not perceived as a bottleneck Performance was evaluated using micro-benchmarks ●Emphasis was put on loops and simple arithmetic ●Dynamic dispatching and memory management were sadly neglected Browser Performance Beliefs in 2006 JavaScript SunSpider: bitwise-and Benchmark from SunSpider version bitwiseAndValue = 4294967296; for (var i = 0; i < 600000; i++) bitwiseAndValue = bitwiseAndValue & i; JavaScript SunSpider: bitwise-and Benchmark from SunSpider version bitwiseAndValue = 4294967296; for (var i = 0; i < 600000; i++) bitwiseAndValue = bitwiseAndValue & i; ... but this always yields zero? JavaScript SunSpider: bitwise-and Benchmark from SunSpider version bitwiseAndValue = 4294967296; for (var i = 0; i < 600000; i++) bitwiseAndValue = bitwiseAndValue & i; if (bitwiseAndValue != 0) throw "ERROR: bad result..."; ... and this always yields zero! (1) Optimize for current apps and benchmarks ●Simple and incremental approach ●Attempt to make things 10% better (2) Optimize for the apps of the future ●Support heavy client putations ●Turn the browser into a scalable application platform ●Enables a new class of web apps V8 Design Choice: What to Optimize For?