diff --git a/dev/js/bench/benchmark.js b/dev/js/bench/benchmark.js
new file mode 100644
index 0000000..78b7df9
--- /dev/null
+++ b/dev/js/bench/benchmark.js
@@ -0,0 +1,70 @@
+
+function addToBody (msg) {
+  var body = document.getElementsByTagName('body')[0];
+  var p = body.appendChild(document.createElement('p'))
+  p.appendChild(document.createTextNode(msg));
+};
+
+define({
+  menuSuite : function (menuClass) {
+    // add tests
+    var suite = new Benchmark.Suite;
+    var menu;
+    suite.add('Menu#creation', function () {
+
+      menu = menuClass.create([
+	['Titel', 'title'],
+	['Untertitel', 'subTitle'],
+	['Veröffentlichungsdatum', 'pubDate'],
+	['Länge', 'length'],
+	['Autor', 'author']
+      ]);
+
+      menu.limit(3).show();
+    });
+
+    suite.add('Menu#next', function () {
+      // Some actions
+      menu.next();
+    });
+
+    suite.add('Menu#prev', function () {
+      menu.prev();
+    });
+
+    suite.add('Menu#paging', function () {
+      var j = 0;
+      while (j < 2) {
+	var i = 0;
+	while (i < 5) {
+	  menu.pageUp();
+	  i++;
+	};
+	while (i > 0) {
+	  menu.pageDown();
+	  i--;
+	};
+	j++;
+      };
+    });
+
+    suite.add('Menu#prefix', function () {
+      menu.prefix('e').show(4);
+      menu.next();
+      menu.next();
+      menu.next();
+      menu.prev();
+      menu.prev();
+      menu.prev();
+    });
+
+    suite.on('error', function(event) {
+      console.log(event.target.error);
+    });
+    suite.on('cycle', function(event) {
+      addToBody(String(event.target));
+    });
+
+    return suite;
+  }
+});
