Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Apr 9, 2015
1 parent e813249 commit f57dc38
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions benchmarks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var RouteRecognizer = require('route-recognizer');
var RouteTrie = require('route-trie');
var Routington = require('routington');
var Router = require('../');
var api = require('../test/github-api')
var api = require('../test/github-api');

var suite = new Benchmark.Suite;

Expand All @@ -26,23 +26,26 @@ api.forEach(function(i) {
});

var routes2 = {};
api.forEach(function (i) {
api.forEach(function(i) {
var method = i[0],
path = i[1];
var r = routes2[method] || (routes2[method] = new RouteRecognizer());
r.add([{ path: path, handler: function () {} }]);
r.add([{
path: path,
handler: function() {}
}]);
});

var routes3 = {};
api.forEach(function (i) {
api.forEach(function(i) {
var method = i[0],
path = i[1];
var r = routes3[method] || (routes3[method] = new RouteTrie());
r.define(path);
});

var routes4 = {};
api.forEach(function (i) {
api.forEach(function(i) {
var method = i[0],
path = i[1];
var r = routes4[method] || (routes4[method] = new Routington());
Expand Down

0 comments on commit f57dc38

Please sign in to comment.