Add buffer_creation benchmark
authorRyan Dahl <ry@tinyclouds.org>
Thu, 19 Aug 2010 08:40:28 +0000 (01:40 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 19 Aug 2010 08:40:28 +0000 (01:40 -0700)
benchmark/buffer_creation.js [new file with mode: 0644]
benchmark/string_creation.js [new file with mode: 0644]

diff --git a/benchmark/buffer_creation.js b/benchmark/buffer_creation.js
new file mode 100644 (file)
index 0000000..3901f04
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+for (var i = 0; i < 9000000; i++) {
+  b = new Buffer(10);
+  b[1] = 2
+}
diff --git a/benchmark/string_creation.js b/benchmark/string_creation.js
new file mode 100644 (file)
index 0000000..f2b5d2c
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+for (var i = 0; i < 9000000; i++) {
+  s = '01234567890';
+  s[1] = "a";
+}