performance measurements

Each table row shows performance measurements for this Perl program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load

Read the ↓ make, command line, and program output logs to see how this program was run.

Read mandelbrot benchmark to see what this program should do.

 notes

This is perl 5, version 18, subversion 0 (v5.18.0) built for x86_64-linux

Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
                        USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF

 mandelbrot Perl #2 program source code

# The Computer Language Shootout
# http://shootout.alioth.debian.org/
# implemented by Greg Buchholz
# streamlined by Kalev Soikonen

sub ITER ()	{ 50 }
sub LIMITSQR ()	{ 2.0 ** 2 }

my ($w, $h, $i);
my ($Cr, $Ci, $Zr, $Zi, $Tr, $Ti);

sub dot {
    $Cr = 2 * $_[0] / $w - 1.5;
    $Ci = 2 * $_[1] / $h - 1.0;

    $Zr = $Zi = $Tr = $Ti = 0.0;
    $i = ITER;
    (
	$Zi = 2.0 * $Zr * $Zi + $Ci,
	$Zr = $Tr - $Ti + $Cr,
	$Ti = $Zi * $Zi,
	$Tr = $Zr * $Zr
    ) until ($Tr + $Ti > LIMITSQR || !$i--);
    return ($i == -1);
}

$w = $h = shift || 80;
print "P4\n$w $h\n";
for my $y (0..$h-1) {
    print pack 'B*', pack 'C*', map dot($_, $y), 0..$w-1;
}

 make, command-line, and program output logs

Sat, 06 Aug 2011 03:58:49 GMT

COMMAND LINE:
/usr/local/src/perl-5.14.1_no_ithreads_no_multi/bin/perl mandelbrot.perl-2.perl 16000

(BINARY) PROGRAM OUTPUT NOT SHOWN

Revised BSD license

  Home   Conclusions   License   Play