bench2 results
Aleksandar Lazic
al-anyevent at none.at
Wed Dec 1 19:57:04 CET 2010
On Mit 01.12.2010 17:57, Marc Lehmann wrote:
>On Wed, Dec 01, 2010 at 04:24:58PM +0100, Aleksandar Lazic <al-anyevent at none.at> wrote:
>> I have added the two XS modules for POE and was surprised that the
>
>There are many POE XS modules, which two did you use?
>
name sockets create request
EV 16 34.48 13.37
POE::XS::Loop::Poll 16 34.24 13.40
POE::XS::Loop::EPoll 16 34.36 13.20
Perl 16 44.49 24.44
Glib 16 56.12 30.92
Event 16 149.61 69.43
POE 16 400.60 343.99
>> Does this mean that with the XS POE could be as fast as EV?
>
>No, it's positively physically impossible, simply because POE has to do
>so much more than EV, in addition to what EV does :) But the last time
>I benchmarked, even with XS, POE was so far off that I am sure there is
>a lot to optimise (I mean, even a factor of ten wouldn't challenge most
>other backends).
>
>Maybe what you got *is* EV because the XS module or POE didn't load
>(try PERL_ANYEVENT_VERBOSE=1 and run the benchmark to see which event
>model it choses).
You are right EV was used.
>And last not least you modified runbench2 - how exactly?
I have attched the modified one.
With the modification I got now the follwoing errors.
###
Can't locate object method "loop_ignore_signal" via package
"POE::Kernel" at
/usr/lib/perl5/vendor_perl/5.12.2/POE/Resource/Signals.pm line 140.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.12.2/POE/Loop/PerlSignals.pm line 17.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.12.2/i686-linux/POE/XS/Loop/Poll.pm line
23.
Compilation failed in require.
BEGIN failed--compilation aborted.
###
I have found that I should call
###
use POE::Kernel { loop => 'POE::XS::Loop::EPoll' };
use POE;
###
but I'am not sure if the effort to adopt the script isn't to high for
yust a test ;-)
I will stick to AnyEvent and don't care about POE.
>> I have run the benchmark at least 5 times, the values above are the
>> medium results.
>
>Could you post the benchmark table as a table? As it is now it's very
>hard to read.
Sorry I have corrected the table.
-------------- next part --------------
#!/bin/bash
rm -rf res; mkdir res
tst() {
res=$((res + 1))
echo
echo res/$res
PERL_ANYEVENT_MODEL=$1 perl $4 bench2 $2 $3 | tee res/$res
}
export PERL_ANYEVENT_VERBOSE=2
a=8
b=3
tst EV $a $b
export POE_EVENT_LOOP=POE::XS::Loop::Poll
tst POE::XS::Loop::Poll $a $b "-MPOE::XS::Loop::Poll -MPOE"
export POE_EVENT_LOO=POE::XS::Loop::EPoll
tst POE::XS::Loop::EPoll $a $b "-MPOE::XS::Loop::EPoll -MPOE"
tst Perl $a $b
tst Glib $a $b
tst Event $a $b
tst POE $a $b "-MEvent -MPOE=Loop::Event"
echo
echo
echo
echo
for ((i=2;i<=res;++i)); do
join res/1 res/$i >res/x && mv res/x res/1
done
{
<res/1 perl -e '
print "<table>";
push @a, [split /\s+/] while <>;
for my $x (0 .. $#{$a[0]}) {
print "<tr>";
for my $y (0 .. $#a) {
print "<td align=\"right\">", $a[$y][$x], "</td>";
}
print "</tr>";
}
print "</table>";
'
} >res/1.html
links -dump res/1.html
More information about the anyevent
mailing list