nashorn/test/examples/array-micro.js
changeset 21438 4292865c758b
parent 18318 5e4244619d79
child 24778 2ff5d7041566
--- a/nashorn/test/examples/array-micro.js	Thu Oct 17 12:38:50 2013 +0200
+++ b/nashorn/test/examples/array-micro.js	Thu Oct 17 17:33:16 2013 +0200
@@ -90,6 +90,24 @@
     array[6] = 6;
 });
 
+bench("push", function() {
+    var arr = [1, 2, 3];
+    arr.push(4);
+    arr.push(5);
+    arr.push(6);
+});
+
+bench("pop", function() {
+    var arr = [1, 2, 3];
+    arr.pop();
+    arr.pop();
+    arr.pop();
+});
+
+bench("splice", function() {
+    [1, 2, 3].splice(0, 2, 5, 6, 7);
+});
+
 var all = function(e) { return true; };
 var none = function(e) { return false; };