Most important I don't understand why both methods using Storable are slower than the other two using plain split for deserialization.
It's because Storable can cope with pretty much anything. Try doing something like this:
use Storable qw( freeze thaw ); { no warnings 'once'; $Storable::Deparse=1; $Storable::Eval=1; } thaw( freeze( sub { print "hello world\n" } ) )->();
with split - or persisting something with with a "|" character in a hash value :-)
Storable is general - and you'll sometimes pay for that with speed.
In reply to Re: Benchmark on deserializing data
by adrianh
in thread Benchmark on deserializing data
by RL
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |