[Catalyst] Alternatives to Catalyst ?

Андрей П. Ковбович akovbovich at gmail.com
Wed Apr 28 17:43:26 GMT 2010


I was curious about what the big deal is raised, so spent a short test.

*** Mojo *** (Alternative to Catalyst)
timethese(-1, {
    param   => sub { $tx->req->param('lang') },
    params  => sub { $tx->req->params->param('lang') },
});

Benchmark: running param, params for at least 1 CPU seconds...
     param:  1 wallclock secs ( 1.07 usr +  0.00 sys =  1.07 CPU) @
13397.20/s (n=14335)
    params:  1 wallclock secs ( 1.08 usr +  0.00 sys =  1.08 CPU) @
8295.37/s (n=8959)

*** Cat ***
timethese(-1, {
    param  => sub { $c->req->param('lang') },
    params => sub { $c->req->params->{'lang'} },
});

Benchmark: running param, params for at least 1 CPU seconds...
     param:  1 wallclock secs ( 1.06 usr +  0.01 sys =  1.07 CPU) @
30918.69/s (n=33083)
    params:  1 wallclock secs ( 1.07 usr +  0.01 sys =  1.08 CPU) @
79643.52/s (n=86015)

My Сat app can handle about 400req/s, at the same time accessor's
access time is about  80K req/s, so if we imagine that we have not
made a single call to $req->param, in that case app will handle
402req/s. Show me the idiot who will try to optimize all the code for
such trifles?



More information about the Catalyst mailing list