Sunspider runs per minute (log scale) Internet Explorer JavaScript performance2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Download Report

Transcript Sunspider runs per minute (log scale) Internet Explorer JavaScript performance2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011

Sunspider runs per minute (log scale)
Internet Explorer
JavaScript performance
1000
100
10
1
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
ECMAScript 5 and strict mode
Test262
Binary data – JavaScript typed arrays
Using multiple cores – Web workers
Projection of Windows into JavaScript
IE10 and ES5 on Windows Phone 8
Node.js on Azure
// Data Property
var bankAccount = {
balance: 1257
}
// Accessor Property
var bankAccount2 = {
get balance() { return 1257; }
set balance(v) { };
}
false
true
true
function
function
true
true
var
for
var
function
var
for
var
function
var
function
function
forEach
filter
map
reduce
reduceRight
indexOf
some
every
(function () {
"use strict";
// this function is strict...
x = 5; // Error!
arguments.caller; // Error!
arguments.callee; // Error!
var o = { x: 5};
Object.freeze(o);
o.x = 7; // Throws
}());
Typed arrays
XHR + File API + WebSockets
Web workers
Message passing
// Create an 8 byte buffer
var
new
// View as an array of Uint8s and put 0x05 in each byte
var
new
for var
// View the same buffer as an array of Uint32s
var
new
ArrayBuffer
uint8s
uint32s
0x05 0x05 0x05 0x05 0x05 0x05 0x05 0x05
0x05050505
0x05050505
var
new
// XMLHttpRequest
var
new
"PUT" "http://myserver"
// Blob & File
var
new
var
new
// WebSockets
var
new
"ws://myserver"
// index.html
<script type='text/javascript'>
var
new
function
</script>
// adder.js
function
var
500
250
0
Chakra (JavaScript)
Trident (Web Platform)
IE9
500
250
0
Chakra (JavaScript)
Trident (Web Platform)
IE9
New in IE10
1000
750
500
250
0
Chakra (JavaScript)
Trident (Web Platform)
Metro style applicatons built using HTML5
WinRT (Windows)
var Popups = Windows.UI.Popups,
UICommand = Popups.UICommand,
MessageDialog = Popups.MessageDialog
var dialog = new MessageDialog("What next?");
var customCommands = [
new UICommand("Say hi", function () { console.log("hello"); }),
new UICommand("Say bye", function () { console.log("goodbye"); })
];
dialog.defaultCommandIndex = 0;
dialog.commands.replaceAll(customCommands);
dialog.showAsync();