Created
May 15, 2013 04:13
-
-
Save rednaxelafx/5581610 to your computer and use it in GitHub Desktop.
Running a simple microbenchmark on both 32-bit and 64-bit versions of JScript 5.8 and 9.0, on 64-bit Windodws 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID] | |
@="Chakra" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{16d51579-a30b-4c8b-a276-0ff4dc41e755}\ProgID] | |
@="Chakra" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra] | |
@="JScript Language" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra\CLSID] | |
@="{16d51579-a30b-4c8b-a276-0ff4dc41e755}" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Chakra\OLEScript] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WScript.Echo( ScriptEngine() + ": " + | |
ScriptEngineMajorVersion() + "." + | |
ScriptEngineMinorVersion() + "." + | |
ScriptEngineBuildVersion()); | |
function foo(o) { | |
var total = 0; | |
for (var i = 0; i < 10000000; i++) { | |
total += o.x + o.y + o.z; | |
} | |
return total; | |
} | |
function Point(x, y, z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} | |
function main() { | |
var counter = 0; | |
for (var i = 0; i < 20; i++) { | |
var start = new Date(); | |
var p1 = new Point(2, 5, 11); | |
var result = foo(p1); | |
var end = new Date(); | |
WScript.Echo(++counter + ": " + (end - start) + "ms " + result); | |
} | |
} | |
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\temp>C:\Windows\syswow64\cscript.exe chakra.test.js | |
Microsoft (R) Windows Script Host Version 5.8 | |
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. | |
JScript: 5.8.16982 | |
1: 10199ms 180000000 | |
2: 10611ms 180000000 | |
3: 10114ms 180000000 | |
4: 9755ms 180000000 | |
5: 11703ms 180000000 | |
6: 9557ms 180000000 | |
7: 7642ms 180000000 | |
8: 9747ms 180000000 | |
9: 10334ms 180000000 | |
10: 10781ms 180000000 | |
11: 11461ms 180000000 | |
12: 9871ms 180000000 | |
13: 8310ms 180000000 | |
14: 10261ms 180000000 | |
15: 12346ms 180000000 | |
16: 9628ms 180000000 | |
17: 8889ms 180000000 | |
18: 10191ms 180000000 | |
19: 11459ms 180000000 | |
20: 10351ms 180000000 | |
D:\temp>C:\Windows\syswow64\cscript.exe chakra.test.js //e:chakra | |
Microsoft (R) Windows Script Host Version 5.8 | |
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. | |
JScript: 9.0.16476 | |
1: 240ms 180000000 | |
2: 219ms 180000000 | |
3: 227ms 180000000 | |
4: 220ms 180000000 | |
5: 221ms 180000000 | |
6: 212ms 180000000 | |
7: 188ms 180000000 | |
8: 192ms 180000000 | |
9: 177ms 180000000 | |
10: 166ms 180000000 | |
11: 165ms 180000000 | |
12: 171ms 180000000 | |
13: 182ms 180000000 | |
14: 177ms 180000000 | |
15: 174ms 180000000 | |
16: 168ms 180000000 | |
17: 173ms 180000000 | |
18: 173ms 180000000 | |
19: 171ms 180000000 | |
20: 163ms 180000000 | |
D:\temp>C:\Windows\system32\cscript.exe chakra.test.js //e:chakra | |
Microsoft (R) Windows Script Host Version 5.8 | |
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. | |
JScript: 9.0.16476 | |
1: 2903ms 180000000 | |
2: 3118ms 180000000 | |
3: 3197ms 180000000 | |
4: 3177ms 180000000 | |
5: 3302ms 180000000 | |
6: 3068ms 180000000 | |
7: 3158ms 180000000 | |
8: 2992ms 180000000 | |
9: 3273ms 180000000 | |
10: 2802ms 180000000 | |
11: 3034ms 180000000 | |
12: 3095ms 180000000 | |
13: 3220ms 180000000 | |
14: 3421ms 180000000 | |
15: 3140ms 180000000 | |
16: 1935ms 180000000 | |
17: 1827ms 180000000 | |
18: 1820ms 180000000 | |
19: 1795ms 180000000 | |
20: 1813ms 180000000 | |
D:\temp>C:\Windows\system32\cscript.exe chakra.test.js | |
Microsoft (R) Windows Script Host Version 5.8 | |
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. | |
JScript: 5.8.16982 | |
1: 12578ms 180000000 | |
2: 12522ms 180000000 | |
3: 10882ms 180000000 | |
4: 13250ms 180000000 | |
5: 14357ms 180000000 | |
6: 13195ms 180000000 | |
7: 13375ms 180000000 | |
8: 10614ms 180000000 | |
9: 9995ms 180000000 | |
10: 13970ms 180000000 | |
11: 11409ms 180000000 | |
12: 13094ms 180000000 | |
13: 13412ms 180000000 | |
14: 13695ms 180000000 | |
15: 12852ms 180000000 | |
16: 14316ms 180000000 | |
17: 11592ms 180000000 | |
18: 8523ms 180000000 | |
19: 8072ms 180000000 | |
20: 7922ms 180000000 | |
D:\temp> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment