Created
January 17, 2011 06:50
-
-
Save marshall/782569 to your computer and use it in GitHub Desktop.
Various V8 perf test results
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
SunSpider tests - higher is better | |
Rhino (Interpreted) | |
------------------- | |
Score: 362 | |
Richards: 425 | |
DeltaBlue: 340 | |
Crypto: 369 | |
RayTrace: 535 | |
EarleyBoyer: 474 | |
RegExp: 108 | |
Splay: 557 | |
Chrome 9.0.597.45 (V8) | |
------------------------------ | |
Score: 5752 | |
Richards: 6012 | |
DeltaBlue: 6665 | |
Crypto: 6367 | |
RayTrace: 7282 | |
EarleyBoyer: 18687 | |
RegExp: 2192 | |
Splay: 2738 | |
Firefox 4.0b9 (Jaegermonkey) | |
---------------------------------- | |
Score: 4355 | |
Richards: 7858 | |
DeltaBlue: 4390 | |
Crypto: 8073 | |
RayTrace: 3297 | |
EarleyBoyer: 4508 | |
RegExp: 1576 | |
Splay: 4555 |
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
Binding to a Java class that increments a counter for every property set and prints the value on propery get. JS loop of 10,000 iterations sets the same property to tht iterator, i.e: | |
//pseudo java | |
class A { | |
protected String a; | |
protected int counter = 0; | |
public void setA(String value) { | |
counter++; | |
this.a = value; | |
} | |
public void getA() { | |
Log.d(TAG, "counter="+counter); | |
return this.a; | |
} | |
} | |
// pseudo js | |
for (var i = 0; i < 10000; i++) { | |
a.testProperty = ""+i; | |
} | |
var x = a.testProperty; | |
v8 on Evo / Froyo 2.2 | |
---------------------- | |
630ms, 800ms, 570ms, 650ms | |
Rhino (evaluated) on Evo / Froyo 2.2 | |
------------------------------------- | |
1050ms, 1160ms, 1300ms, 1250ms |
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
// TEST ONE WITH PROTOTYPE | |
function User() {} | |
for(var i = 0; i < 50000; i++) { | |
User.prototype[i] = {}; | |
} | |
console.log("test1: " + (new Date() - timetest)); | |
timetest = new Date(); | |
// TEST TWO Module Pattern | |
var User = function() { | |
var obj = {}; | |
for(var i = 0; i < 50000; i++) { | |
obj[i] = {}; | |
} | |
return obj; | |
}; | |
var test = new User(); | |
console.log("test2: " + (new Date() - timetest)); |
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
Android 2.2 Emulator, default AVD options | |
v8 | |
--- | |
Run 1: | |
test 1: 440ms | |
test 2: 411ms | |
Run 2: | |
test 1: 437ms | |
test 2: 572ms | |
Run 3: | |
test 1: 558ms | |
test 2: 163ms | |
Rhino (compiled) | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment