出处:P&H,Computer Organization and Design,The Hardware/Software Interface,4ed
Language | Execution method | Optimization | Bubble Sort relative performance | Quicksort | Speedup Quicksort vs Bubble Sort |
C | compiler | none | 1.00 | 1.00 | 2468 |
compiler | O1 | 2.37 | 1.50 | 1562 | |
compiler | O2 | 2.38 | 1.50 | 1555 | |
compiler | O3 | 2.41 | 1.91 | 1955 | |
Java | interpreter | - | 0.12 | 0.05 | 1050 |
Just in time compiler | - | 2.13 | 0.29 | 338 |
JVM : Sun version 1.3.1
JIT: Sun Hotspot version 1.3.1