/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
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 |
|---|---|---|---|---|---|
| 1,000 | 12.58 | 12.59 | 1,732 | 370 | 1% 1% 1% 100% |
| 4,000 | 194.64 | 194.73 | 1,732 | 370 | 0% 1% 1% 100% |
| 16,000 | 3,144.22 | 3,145.53 | 1,992 | 370 | 0% 1% 0% 100% |
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.
This is perl 5, version 18, subversion 0 (v5.18.0) built for i686-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_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
# The Computer Language Benchmarks Game # http://benchmarksgame.alioth.debian.org/ # # contributed by Rodrigo de Almeida Siqueira use strict; my $MAXITER = 50; my $LIMIT = 4; my $xmin = -1.5; my $ymin = -1; my ($w, $h); $w = $h = shift || 200; my $invN = 2/$w; print "P4\n$w $h\n"; # PBM image header my $checknext=1; for my $y (0..$h-1) { my @v; my $Ci = $y * $invN + $ymin; X: for my $x (0..$w-1) { my ($Zr, $Zi, $Tr, $Ti); my $Cr = $x * $invN + $xmin; if ($checknext) { # Iterate with checking (likely outer pixel) for (1..$MAXITER) { $Zi = 2 * $Zr * $Zi + $Ci; $Zr = $Tr - $Ti + $Cr; $Ti = $Zi * $Zi; $Tr = $Zr * $Zr; if ($Tr + $Ti > $LIMIT) { push @v, 0; # White pixel next X; } } push @v, 1; # Black pixel $checknext = 0; # Is inner pixel. } else { # Iterate without checking (likely inner pixel) for (1..$MAXITER) { $Zi = 2 * $Zr * $Zi + $Ci; $Zr = $Tr - $Ti + $Cr; $Ti = $Zi * $Zi; $Tr = $Zr * $Zr; } if ($Tr+$Ti <= 4) { push @v, 1; } else { # $Tr+$Ti is a large number or overflow ('nan' or 'inf') push @v, 0; $checknext = 1; } } } print pack 'B*', pack 'C*', @v; }
Tue, 21 May 2013 19:09:57 GMT COMMAND LINE: /usr/local/src/perl-5.18.0_no_ithreads_no_multi/bin/perl mandelbrot.perl-3.perl 16000 (BINARY) PROGRAM OUTPUT NOT SHOWN