Created
September 4, 2009 07:15
-
-
Save yappo/180780 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use Benchmark ':all'; | |
| use LWP::Simple; | |
| use Cache::Memcached::Fast; | |
| my $mc = Cache::Memcached::Fast->new({ servers => [ 'localhost:12321' ] }); | |
| cmpthese(10000, { | |
| http => sub { | |
| die unless (get 'http://localhost:8080/yappo') eq 'yappo'; | |
| }, | |
| memcached => sub { | |
| die unless ($mc->get('/yappo') eq 'yappo'); | |
| }, | |
| }); | |
| __END__ | |
| Rate http memcached | |
| http 2433/s -- -33% | |
| memcached 3623/s 49% -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment