use strict; use warnings; use MCE::Child; use MCE::Channel; #my $chnl = MCE::Channel->new(impl => "MutexFast"); # 3.552s none #my $chnl = MCE::Channel->new(impl => "Mutex"); # 4.025s Sereal # 4.815s Storable my $chnl = MCE::Channel->new(impl => "SimpleFast"); # 0.949s none #my $chnl = MCE::Channel->new(impl => "Simple"); # 1.644s Sereal # 3.286s Storable my $size = 1_000_000; my $proc = MCE::Child->create(sub { my $ret; $ret = $chnl->recv() for 1..$size; }); $chnl->send("this is something $_") for 1..$size; $proc->join();