OCaml vs Swift
Swift 以 14.4 分领先于 OCaml 的 8.7 分(相差 5.7 分)。
在 14 项共同基准测试中,OCaml 胜出 2 项,Swift 胜出 12 项。
OCaml 在内存效率方面领先。 Swift 在流行度方面领先。
正面对比
共同基准测试(14)
| 基准测试 | OCaml | Swift |
|---|---|---|
binarytrees time (s) ↓ Programming Language Benchmarks | 3.02 | 2.661 |
fannkuch-redux time (s) ↓ Programming Language Benchmarks | 2.91 | 2.469 |
fasta time (s) ↓ Programming Language Benchmarks | 0.346 | 0.138 |
nbody time (s) ↓ Programming Language Benchmarks | 0.373 | 0.343 |
binary-trees time (s) ↓ The Computer Language Benchmarks Game | 3.55 | 17.6 |
fannkuch-redux time (s) ↓ The Computer Language Benchmarks Game | 8.84 | 8.2 |
fasta time (s) ↓ The Computer Language Benchmarks Game | 3.37 | 2.2 |
k-nucleotide time (s) ↓ The Computer Language Benchmarks Game | 16.2 | 14.4 |
mandelbrot time (s) ↓ The Computer Language Benchmarks Game | 7.6 | 1.35 |
n-body time (s) ↓ The Computer Language Benchmarks Game | 6.95 | 5.45 |
pidigits time (s) ↓ The Computer Language Benchmarks Game | 2.77 | 0.76 |
regex-redux time (s) ↓ The Computer Language Benchmarks Game | 2.2 | 18.2 |
reverse-complement time (s) ↓ The Computer Language Benchmarks Game | 2.27 | 2.05 |
spectral-norm time (s) ↓ The Computer Language Benchmarks Game | 5.34 | 1.45 |