Permalink
Browse files

Move logs to end

Change-Id: I1fbba93d5dc008e7b1e28d2a5dfe145873b85342
  • Loading branch information...
1 parent 159d6a3 commit c726282cd078056e9d0118debf3d2e1367c13487 @creationix committed Jan 4, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 bench.js
View
@@ -11,14 +11,16 @@ while (true) {
JSON.parse(json);
}
var first = Date.now() - start;
- console.log("JSON.parse took %s", first);
start = Date.now();
var p = new Parser();
for (var i = 0; i < 1000; i++) {
p.write(json);
}
var second = Date.now() - start;
+
+
+ console.log("JSON.parse took %s", first);
console.log("streaming parser took %s", second);
console.log("streaming is %s times slower", second / first);
}

0 comments on commit c726282

Please sign in to comment.