opensubscriber
   Find in this group all groups
 
Unknown more information…

b : boston-pm@mail.pm.org 28 October 2005 • 3:03AM -0400

[Boston.pm] Junction performance
by Jerrad Pierce

REPLY TO AUTHOR
 
REPLY TO GROUP



In case anyone is interested:

ANY:
      s/iter    QS    P6
QS      1.22    --  -98%
P6 2.04e-002 5889%    --

ALL:
     Rate    QS    P6
QS 1.44/s    --  -98%
P6 78.0/s 5318%    --

__CODE__
package Bob;
use Perl6::Junction;
use Quantum::Superpositions;

package main;
use Benchmark;

sub ANY{
  if( &{$_[0].'::any'}(1 .. 10_000) > 10_001 ){
    warn "This should not happen\n";
  }
  if( &{$_[0].'::any'}(1 .. 10_000) == 42 ){
    #print "The Answer\n";
  }
}
sub ALL{
  unless( &{$_[0].'::all'}(1 .. 10_000) < 10_001 ){
    warn "This should not happen\n";
  }
}

print "ANY:\n";
Benchmark::cmpthese(50,
    {
     P6=>sub{ANY 'Perl6::Junction'},
     QS=>sub{ANY 'Quantum::Superpositions'}
    });
print "ALL:\n";
Benchmark::cmpthese(50,
    {
     P6=>sub{ALL 'Perl6::Junction'},
     QS=>sub{ALL 'Quantum::Superpositions'}
    });
--
H4sICNoBwDoAA3NpZwA9jbsNwDAIRHumuC4NklvXTOD0KSJEnwU8fHz4Q8M9i3sGzkS7BBrm
OkCTwsycb4S3DloZuMIYeXpLFqw5LaMhXC2ymhreVXNWMw9YGuAYdfmAbwomoPSyFJuFn2x8
Opr8bBBidccAAAA=
--
MOTD on Setting Orange, the 8th of The Aftermath, in the YOLD 3171:
J'en fais peu mais je le fais bien

_______________________________________________
Boston-pm mailing list
Boston-pm@mail...
http://mail.pm.org/mailman/listinfo/boston-pm

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.