Skip to content

Instantly share code, notes, and snippets.

@wende
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save wende/08328bf06de2c8aeb638 to your computer and use it in GitHub Desktop.

Select an option

Save wende/08328bf06de2c8aeb638 to your computer and use it in GitHub Desktop.
function test_s(times){
var i = times;
var t = Date.now()
while(i--){
var a = 1
var b = 2
var c = 3
var d = 4
var e = 5
a = a * 5
b = Math.pow(b, 10)
c = Math.pow(c, 11)
d = Math.pow(d, 12)
e = Math.pow(e, 25)
}
return Date.now() - t;
}
function test_i(times){
var i = times;
var t = Date.now()
while(i--){
var a = 1
var b = 2
var c = 3
var d = 4
var e = 5
e = Math.pow(e, 25)
d = Math.pow(d, 12)
c = Math.pow(c, 11)
b = Math.pow(b, 10)
a = a * 5
}
return Date.now() - t;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment