/mobile Handheld Friendly website

 meteor-contest benchmark N=2,098

Each chart bar shows how many times slower, one ↓ meteor-contest program was, compared to the fastest program.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0C++ g++ #6 0.050.05?2620  0% 0% 20% 100%
1.6C++ g++ #4 0.070.07?5330  13% 0% 0% 100%
1.8C gcc 0.080.08?3066  0% 0% 0% 100%
1.8C++ g++ #3 0.080.09?4862  0% 0% 11% 100%
1.8C++ g++ #5 0.080.08?5051  0% 11% 0% 90%
1.9Ada 2005 GNAT 0.080.09?7416  0% 0% 0% 100%
1.9Pascal Free Pascal #3 0.080.09?5471  0% 0% 0% 100%
2.7C++ g++ 0.120.12?4343  0% 0% 0% 100%
2.9Go 0.130.13?2986  7% 0% 0% 100%
3.1Rust 0.140.14?3001  0% 0% 0% 93%
3.4C++ g++ #2 0.150.16?4080  0% 0% 0% 94%
11Java  #2 0.480.4824,3925177  0% 4% 0% 100%
11Haskell GHC #5 0.480.483,8122919  0% 0% 2% 100%
12Haskell GHC #3 0.540.543,5361804  0% 2% 5% 100%
13Smalltalk VisualWorks 0.600.6142,3365304  0% 2% 0% 100%
13Racket 0.610.6120,4961907  0% 2% 8% 100%
14Haskell GHC #2 0.640.653,5601891  0% 0% 3% 98%
16Lua #4 0.720.723,3602225  0% 11% 1% 100%
17OCaml 0.780.793,8882156  0% 0% 3% 100%
19Haskell GHC 0.870.873,6242200  0% 0% 2% 100%
20Java  0.890.9022,2604368  1% 2% 1% 100%
21Lua #3 0.960.963,3921703  0% 1% 0% 100%
22Lua #2 0.970.973,3641657  0% 0% 1% 100%
40Haskell GHC #4 1.821.824,596803  0% 1% 1% 100%
45Lua 2.022.023,1241561  0% 2% 0% 100%
108Ruby #2 4.844.848,9522786  1% 1% 0% 100%
122Clojure #2 5.505.5082,2363689  0% 1% 1% 100%
162Python 3 #2 7.297.295,8921311  0% 0% 0% 100%
211Python 3 9.519.525,7961442  2% 0% 0% 100%
217Python 3 #3 9.769.776,3121206  1% 0% 1% 100%
228Ruby 10.2510.269,5962768  1% 1% 0% 100%
441Ruby JRuby #2 19.8619.90690,1682786  0% 1% 1% 100%
525Ruby JRuby 23.6423.67668,6642768  1% 1% 1% 100%
550Perl #2 24.7624.774,0561502  0% 0% 0% 100%
1,107Perl 49.8049.834,0561541  0% 0% 0% 100%
Scala Failed2088
Scala #4 Failed2532
missing benchmark programs
C# Mono No program
Dart No program
Erlang HiPE No program
F# Mono No program
Fortran Intel No program
Hack No program
JavaScript V8 No program
Lisp SBCL No program
PHP No program

 meteor-contest benchmark : Search for solutions to shape packing puzzle

This is a contest - different algorithms may be used.

You are expected to diff the output from your program N = 2098 against this output file before you contribute your program.

The Meteor Puzzle board is made up of 10 rows of 5 hexagonal Cells. There are 10 puzzle pieces to be placed on the board, we'll number them 0 to 9. Each puzzle piece is made up of 5 hexagonal Cells. As different algorithms may be used to generate the puzzle solutions, we require that the solutions be printed in a standard order and format. Here's one approach - working along each row left to right, and down the board from top to bottom, take the number of the piece placed in each cell on the board, and create a string from all 50 numbers, for example the smallest puzzle solution would be represented by

00001222012661126155865558633348893448934747977799

Print the smallest and largest Meteor Puzzle 50 character solution string in this format to mimic the hexagonal puzzle board:

0 0 0 0 1 
 2 2 2 0 1 
2 6 6 1 1 
 2 6 1 5 5 
8 6 5 5 5 
 8 6 3 3 3 
4 8 8 9 3 
 4 4 8 9 3 
4 7 4 7 9 
 7 7 7 9 9 

The command line parameter N should limit how many solutions will be found before the program halts, so that you can work with just a few solutions to debug and optimize your program.

Diff program output N = 2098 against the output file to check the format is correct.

Notes

The Meteor Puzzle and 3 Java puzzle solvers are described in "Optimize your Java application's performance" (pdf).

Revised BSD license

  Home   Conclusions   License   Play