#!/usr/bin/env perl use strict; use warnings; use Benchmark qw(cmpthese); use Dancer::Session::Abstract; use Apache::Session::Generate::MD5; use Catalyst::Plugin::Session; use MVC::Neaf::X::Session; $SIG{__DIE__} = \&Carp::confess; my $cat = Catalyst::Plugin::Session->new; cmpthese( -1, { dancer => \&Dancer::Session::Abstract::build_id, apache => \&Apache::Session::Generate::MD5::generate, catalyst => sub { $cat->generate_session_id }, neaf => \&MVC::Neaf::X::Session::get_session_id, }); #### bash$ perl -Ilib bench.pl Rate dancer catalyst apache neaf dancer 4886/s -- -62% -92% -93% catalyst 12922/s 164% -- -79% -81% apache 61265/s 1154% 374% -- -12% neaf 69591/s 1324% 439% 14% --