The Computer Language
24.11 Benchmarks Game

startup

Let's reduce n-body program workload 250x from N=50,000,000 to N=200,000, so runtimes are only hundredths-of-a-second.

Let's perform a series of "warm-up" calculations and measure elapsed-seconds in-process to exclude startup costs.

3000 in-process nbody Java #8 elapsed secs measurements

Similar but different: Let's perform one calculation and measure elapsed-seconds "process" to include startup costs. Let's perform one calculation and measure elapsed-seconds "in-process" to exclude startup costs. Let's perform 3,000 "warm-up" calculations and then measure elapsed-seconds in-process to exclude startup costs.

  source process in-process warm-up    
  C# aot #0 0.034 0.029  
  C# aot     0.028
  C gcc #0 0.025 0.024  
  C gcc     0.022
  Java #0 0.151 0.076  
  Java     0.029
  Java -Xint #0 0.939 0.748  
  Java -Xint     0.748
  Node.js #0 0.133 0.046  
  Node.js     0.038
  Python 3 #0 2.065 2.041  
  Python 3     2.037
  Ruby yjit #0 1.648 1.565  
  Ruby yjit     1.551
  Toit #0 2.053 1.982  
  Toit     2.121

The N=50,000,000 workload used for n-body programs takes seconds and tens-of-seconds. The Java "warm-up" measurement is tenths-of-a-second faster.

100 in-process nbody Java #8 elapsed secs measurements