/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one 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 |
|---|---|---|---|---|---|
| 500,000 | 2.56 | 2.57 | 9,836 | 560 | 0% 0% 1% 100% |
| 5,000,000 | 25.72 | 25.75 | 9,836 | 560 | 0% 0% 0% 100% |
| 50,000,000 | 267.59 | 267.78 | 9,836 | 560 | 0% 0% 0% 100% |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read thread-ring benchmark to see what this program should do.
GNAT 4.6
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
-- The Computer Language Benchmarks Game -- http://benchmarksgame.alioth.debian.org/ -- Contributed by Jacob Sparre Andersen (with help from Alex Mason) -- -- Compile with: -- gnatmake -gnat05 -gnatE -gnato -gnatv -gnati1 -gnatf -m -O3 -funroll-loops -funwind-tables -gnatn -fomit-frame-pointer -march=native thread_ring with Ada.Text_IO; with Ada.Command_line; procedure ThreadRing is Ring_Size : constant := 503; type Ring_Index is mod Ring_Size; package Ring_Text_IO is new Ada.Text_IO.Modular_IO (Ring_Index); protected type Store is entry Put (Item : in Integer); entry Take (Item : out Integer); private Value : Integer; Full : Boolean := False; end Store; protected body Store is entry Put (Item : in Integer) when not Full is begin Value := Item; Full := True; end Put; entry Take (Item : out Integer) when Full is begin Item := Value; Full := False; end Take; end Store; type Store_Ring is array (Ring_Index) of Store; Stores : Store_Ring; task type Node is entry Initialize (Identifier : in Ring_Index); end Node; task body Node is ID : Ring_Index; Token : Integer; begin accept Initialize (Identifier : in Ring_Index) do ID := Identifier; end Initialize; loop Stores (ID).Take (Token); if Token = 0 then Ring_Text_IO.Put (ID, Width => 0); Ada.Text_IO.New_Line; end if; Stores (ID + 1).Put (Token - 1); exit when Token < 0; end loop; end Node; type Node_Ring is array (Ring_Index) of Node; Nodes : Node_Ring; begin for ID in Nodes'Range loop Nodes (ID).Initialize (Identifier => ID); end loop; Stores (1).Put (Integer'Value (Ada.Command_Line.Argument (1))); end ThreadRing;
Sun, 28 Apr 2013 00:24:56 GMT MAKE: /usr/bin/gnatchop -r -w threadring.gnat-2.gnat splitting threadring.gnat-2.gnat into: threadring.adb /usr/bin/gnatmake -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -gnatNp -f threadring.adb -o threadring.gnat-2.gnat_run gcc-4.6 -c -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -gnatNp threadring.adb gnatbind -x threadring.ali gnatlink threadring.ali -O3 -fomit-frame-pointer -march=native -msse3 -mfpmath=sse -o threadring.gnat-2.gnat_run 0.50s to complete and log all make actions COMMAND LINE: ./threadring.gnat-2.gnat_run 50000000 PROGRAM OUTPUT: 292