Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

9.9){ return number_format($d); } elseif ($d>0.0){ return number_format($d,1); } else { return " "; } } // PAGE //////////////////////////////////////////////// MkMenuForm($Tests,$SelectedTest,$Langs,NULL); $Row = $Tests[$SelectedTest]; $TestName = $Row[TEST_NAME]; $TestTag = $Row[TEST_TAG]; $TestLink = $Row[TEST_LINK]; list($Succeeded,$Failed,$Special,$Labels,$Ratios) = $Data; unset($Data); $first = 0; $NString = 'N=?'; foreach($Succeeded as $d){ if ($d[DATA_TESTVALUE]>0){ $testValue = (double)$d[DATA_TESTVALUE]; $NString = 'N='.number_format($testValue); break; } } // BEWARE - Hard coded values - BEWARE if ($TestName=='fasta'||$TestName=='k-nucleotide'|| $TestName=='reverse-complement'||$TestName=='regex-dna'){ if ($d[DATA_TESTVALUE] == 25000000) { $NString = '≈240MB '.$NString; } elseif ($d[DATA_TESTVALUE] == 2500000) { $NString = '≈24MB '.$NString; } elseif ($d[DATA_TESTVALUE] == 5000000) { $NString = '≈50MB '.$NString; } elseif ($d[DATA_TESTVALUE] == 1000000) { $NString = '≈10MB '.$NString; } elseif ($d[DATA_TESTVALUE] == 500000) { $NString = '≈5MB '.$NString; } } if ($TestName=='startup'){ $NString = ''; } // Use the table column headers to emphasize the row sort order $CPU_sort_td = 'sort'; $MEM_sort_td = 'sort'; $ELAPSED_sort_td = 'sort'; $GZBYTES_sort_td = 'sort'; if ($Sort=='fullcpu'){ $CPU_sort_td = ' '; $Chart_intro_1 = 'how many times slower'; $Chart_intro_2 = 'program was, compared to the fastest program'; } elseif ($Sort=='kb'){ $MEM_sort_td = ' '; $Chart_intro_1 = 'how many times more Memory'; $Chart_intro_2 = 'program used, compared to the program that used least Memory'; } elseif ($Sort=='elapsed'){ $ELAPSED_sort_td = ' '; $Chart_intro_1 = 'how many times slower'; $Chart_intro_2 = 'program was, compared to the fastest program'; } elseif ($Sort=='gz'){ $GZBYTES_sort_td = ' '; $Chart_intro_1 = 'how many times more Code'; $Chart_intro_2 = 'program used, compared to the program that used least Code'; } if ($CanonicalPage){ echo '

'; } ?>

  benchmark 

Each chart bar shows , one ↓  .

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.

   
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
missing benchmark programs
Python 2 No program
PyPy 2 No program
Python 3 No program
Python development version No program
PyPy 3 No program
Jython No program
IronPython No program
Cython No program
Nuitka No program
Shedskin No program
Numba No program
Pyston No program
MicroPython No program
Grumpy No program
Graal No program
RustPython No program

  benchmark : 

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.

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