/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
Each table row shows performance measurements for this Ada 2005 GNAT program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 1,000 | 0.23 | 0.23 | 480 | 572 | 0% 0% 8% 96% |
| 4,000 | 3.66 | 3.66 | 960 | 572 | 0% 1% 100% 0% |
| 16,000 | 58.10 | 58.12 | 964 | 572 | 99% 0% 0% 1% |
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.
GNATMAKE 4.6
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
-- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org -- -- Contributed by Jim Rogers -- Fixed by Pascal Obry on 2005/03/21 -- Modified Experimental version suggested by Pascal Obry with GNAT.IO; use GNAT.IO; with Ada.Command_Line; use Ada.Command_Line; with Interfaces; use Interfaces; procedure Mandelbrot is type Real is digits 15; Iter : constant := 50; Limit : constant := 4.0; Width, Height : Positive; Bit_Num : Natural := 0; Byte_Acc : Unsigned_8 := 0; Zr, Zi, Cr, Ci, Tr, Ti, Zr2, Zi2 : Real; begin Width := Positive'Value (Argument (1)); Height := Width; Put_Line ("P4"); Put_Line (Argument (1) & " " & Argument (1)); for Y in 0 .. Height - 1 loop for X in 0 .. Width - 1 loop Zr := 0.0; Zi := 0.0; Cr := 2.0 * Real (X) / Real (Width) - 1.5; Ci := 2.0 * Real (Y) / Real (Height) - 1.0; for I in 1 .. Iter + 1 loop Zr2 := Zr ** 2; Zi2 := Zi ** 2; Tr := Zr2 - Zi2 + Cr; Ti := 2.0 * Zr * Zi + Ci; Zr := Tr; Zi := Ti; exit when Zr2 + Zi2 > Limit; end loop; if Zr2 + Zi2 > Limit then Byte_Acc := Shift_Left (Byte_Acc, 1) or 16#00#; else Byte_Acc := Shift_Left (Byte_Acc, 1) or 16#01#; end if; Bit_Num := Bit_Num + 1; if Bit_Num = 8 then Put (Character'Val (Byte_Acc)); Byte_Acc := 0; Bit_Num := 0; elsif X = Width - 1 then Byte_Acc := Shift_Left (Byte_Acc, 8 - (Width mod 8)); Put (Character'Val (Byte_Acc)); Byte_Acc := 0; Bit_Num := 0; end if; end loop; end loop; end Mandelbrot;
Sat, 27 Apr 2013 16:36:29 GMT MAKE: /usr/bin/gnatchop -r -w mandelbrot.gnat-2.gnat splitting mandelbrot.gnat-2.gnat into: mandelbrot.adb /usr/bin/gnatmake -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -gnatNp -f mandelbrot.adb -o mandelbrot.gnat-2.gnat_run gcc-4.6 -c -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -gnatNp mandelbrot.adb gnatbind -x mandelbrot.ali gnatlink mandelbrot.ali -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -o mandelbrot.gnat-2.gnat_run 0.21s to complete and log all make actions COMMAND LINE: ./mandelbrot.gnat-2.gnat_run 16000 (BINARY) PROGRAM OUTPUT NOT SHOWN