/mobile Handheld Friendly website

 meteor-contest benchmark N=2,098

Each chart bar shows how many times more Memory, one ↓ meteor-contest program used, compared to the program that used least Memory.

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.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 Ada 2005 GNAT 0.090.09?7416  11% 11% 0% 100%
 Pascal Free Pascal #3 0.080.09?5471  0% 0% 90% 0%
 C++ g++ 0.120.12?4343  14% 0% 100% 8%
 C++ g++ #4 0.070.07?5330  0% 0% 100% 0%
 C++ g++ #5 0.090.09?5051  0% 0% 0% 100%
 C++ g++ #6 0.050.02?2620  100% 100% 100% 100%
 Rust 0.140.14?3001  0% 100% 0% 0%
 Go 0.130.13?2986  92% 0% 0% 0%
 C++ g++ #2 0.150.16?4080  6% 6% 94% 0%
 C++ g++ #3 0.080.09?4862  0% 0% 100% 0%
 C gcc 0.080.08?3066  0% 0% 11% 100%
 Java  #2 0.530.297125177  48% 17% 28% 97%
 Haskell GHC 1.270.973,8362200  100% 12% 13% 10%
 OCaml 0.790.793,8882156  0% 0% 1% 100%
 Haskell GHC #3 0.830.603,9521804  12% 12% 100% 12%
 Haskell GHC #2 0.970.723,9521891  11% 100% 11% 13%
 Haskell GHC #4 2.572.014,100803  11% 9% 9% 100%
 Perl 51.0151.044,2281541  0% 0% 0% 100%
 Perl #2 25.5125.524,2281502  0% 100% 0% 0%
 Haskell GHC #5 0.790.584,2322919  11% 13% 100% 14%
 Python 3 9.649.655,7921442  1% 0% 0% 100%
 Python 3 #2 7.287.295,8961311  1% 0% 1% 100%
 Python 3 #3 9.849.846,3161206  0% 0% 100% 1%
 Ruby #2 4.814.818,9562786  1% 1% 0% 100%
 Ruby 10.1610.179,5962768  16% 100% 0% 1%
 Racket 0.610.6120,5281907  2% 3% 2% 100%
 Java  0.940.8122,5004368  9% 1% 16% 99%
 Clojure #2 6.282.8985,1243689  39% 52% 53% 76%
 Ruby JRuby 24.0512.80663,7882768  27% 35% 35% 93%
 Ruby JRuby #2 21.009.88671,2042786  43% 34% 90% 47%
Scala Failed2088
Scala #4 Failed2532
missing benchmark programs
C# Mono No program
Dart No program
Erlang No program
Erlang HiPE No program
F# Mono No program
Fortran Intel No program
Hack 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