Home > Archive > PERL Beginners > December 2007 > is this a rigged test?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
is this a rigged test?
|
|
| Tom Arnall 2007-12-30, 7:01 pm |
| 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!!! 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.
tom arnall
arcata
| |
| John W. Krahn 2007-12-30, 10:02 pm |
| 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
| |
| Isaac Gouy 2007-12-31, 7:01 pm |
| On Dec 30, 5:37 pm, kloro2...@gmail.com (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!!! 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.
>
> tom arnall
> arcata
Anyone can contribute better programs to the benchmarks game, follow
the instructions in the FAQ:
http://shootout.alioth.debian.org/gp4/faq.php#play
|
|
|
|
|