Browse Source

Add buffer_creation benchmark

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
12a169e8ff
  1. 6
      benchmark/buffer_creation.js
  2. 6
      benchmark/string_creation.js

6
benchmark/buffer_creation.js

@ -0,0 +1,6 @@
for (var i = 0; i < 9000000; i++) {
b = new Buffer(10);
b[1] = 2
}

6
benchmark/string_creation.js

@ -0,0 +1,6 @@
for (var i = 0; i < 9000000; i++) {
s = '01234567890';
s[1] = "a";
}
Loading…
Cancel
Save