Re: is this a rigged test?



tom arnall wrote:
is this a rigged test? at:

http://shootout.alioth.debian.org/gp4/benchmark.php?\
test=partialsums&lang=perl&id=3

i find a 'partial-sums' benchmark coded in Perl, in which what should be a constant is coded as a subroutine call!!!

In Perl constants are defined as subroutines. See the "Constant Functions" section of perlsub:

perldoc perlsub

I looked at the same benchmark for Python and they use a constant. is this for real?

the partial-sums code was all i checked.

John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.



Relevant Pages

  • is this a rigged test?
    ... is this a rigged test? ... i find a 'partial-sums' benchmark coded in Perl, in which what should be a ... constant is coded as a subroutine call!!! ... the partial-sums code was all i checked. ...
    (perl.beginners)
  • Re: is this a rigged test?
    ... i find a 'partial-sums' benchmark coded in Perl, in which what should be a ... constant is coded as a subroutine call!!! ... I looked at the same benchmark for ... the partial-sums code was all i checked. ...
    (perl.beginners)
  • Re: date problem
    ... > However as it turns out, even this was inadequate as perl executed the ... Do you just need consecutive 15 digit numbers or do ... See perldoc perlsub for why getUnique15DigitDateis preferable to ... ITYM 'execution time'. ...
    (comp.lang.perl.misc)
  • Re: date problem
    ... > However as it turns out, even this was inadequate as perl executed the ... Do you just need consecutive 15 digit numbers or do ... See perldoc perlsub for why getUnique15DigitDateis preferable to ... ITYM 'execution time'. ...
    (comp.unix.shell)
  • Re: how to pass array and varaible
    ... but what is the reason for less time when you pass the ref? ... >> I always thought the perl optimizes by sending the ref even if you ... >> use a direct array. ...
    (perl.beginners)