Skip to content

Commit

Permalink
updated typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Llamas committed Oct 16, 2013
1 parent da07a0f commit 5f90dc5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/typeof.js
Expand Up @@ -4,15 +4,18 @@ var speedy = require ("../lib");

var s = "string";

//1 closure lookup and 1 variable definition per test

speedy.run ({
cache: function (){
var type = typeof s;
type === "number";
type === "string";
},
"no-cache": function (){
typeof s === "number";
typeof s === "string";
var str = s;
typeof str === "number";
typeof str === "string";
}
});

Expand All @@ -21,7 +24,7 @@ File: typeof.js
Node v0.10.20
V8 v3.14.5.9
Speedy v0.1.0
Speedy v0.1.1
Tests: 2
Timeout: 1000ms (1s 0ms)
Expand All @@ -32,9 +35,9 @@ Total time: ~6000ms (6s 0ms)
Higher is better (ops/sec)
cache
82,349,483 ± 0.0%
82,518,276 ± 0.0%
no-cache
147,240,709 ± 0.0%
148,560,774 ± 0.0%
Elapsed time: 6147ms (6s 147ms)
Elapsed time: 6054ms (6s 54ms)
*/

0 comments on commit 5f90dc5

Please sign in to comment.