Created
January 23, 2014 20:15
-
-
Save mraleph/8585983 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function B1() { | |
// Benchmark.prototype.setup goes here | |
var str = '1.1'; | |
var start = new Date; | |
for (...) { // do N iterations of test body | |
str++; | |
} | |
var end = new Date; | |
}; | |
function B2() { | |
// Benchmark.prototype.setup goes here | |
var str = '1.1'; | |
var start = new Date; | |
for (...) { // do N iterations of test body | |
parseFloat(str); | |
} | |
var end = new Date; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment