Swift VS Lua benchmarks

Current benchmark data was generated on Fri May 20 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 3451ms 12ms 5.4MB 3427ms 3ms swift 5.6.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 302ms 17ms 5.2MB 280ms 0ms swift 5.6.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3-m.swift 369ms 4.6ms 21.0MB 663ms 7ms swift 5.6.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 64ms 15ms 14.6MB 60ms 0ms swift 5.6.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
lua 1.lua 2.2ms 0.7ms 2.2MB 0ms 0ms luajit 2.1.0
lua 1.lua 2.5ms 0.9ms 1.1MB 0ms 0ms lua 5.4.4
swift 1.swift 7.3ms 9.6ms 4.8MB 0ms 0ms swift 5.6.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 2306ms 390ms 54.4MB 3920ms 23ms swift 5.6.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 385ms 25ms 33.7MB 637ms 10ms swift 5.6.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 426ms 0.4ms 5.4MB 417ms 0ms swift 5.6.1
lua 4.lua 1145ms 21ms 2.4MB 1137ms 0ms luajit 2.1.0
lua 4.lua timeout 0.0ms 0.0MB 0ms 0ms lua 5.4.4

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 55ms 14ms 5.4MB 40ms 0ms swift 5.6.1
lua 4.lua 119ms 0.9ms 2.3MB 110ms 0ms luajit 2.1.0
lua 4.lua 1178ms 9.7ms 1.1MB 1167ms 0ms lua 5.4.4

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift timeout 0.0ms 0.0MB 0ms 0ms swift 5.6.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 3474ms 78ms 6.4MB 3450ms 0ms swift 5.6.1