Skip to content

Instantly share code, notes, and snippets.

@und3f
Created September 2, 2011 07:04
Show Gist options
  • Save und3f/1188076 to your computer and use it in GitHub Desktop.
Save und3f/1188076 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw(:hireswallclock);
use Routes::Tiny;
my $routes = Routes::Tiny->new;
$routes->add_route('/test' . $_ . '/:controller', method => 'GET')
for (1 .. 10);
$routes->add_route('/test/:controller');
timethis 20, sub {
$routes->match('/test/' . $_, method => 'GET') for (1 .. 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment