Swift VS Julia benchmarks

Current benchmark data was generated on Sat Jan 28 2023, 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
julia 2-m.jl 1774ms 2.9ms 211.0MB 3117ms 120ms julia 1.8.5
swift 1.swift 3393ms 14ms 2.4MB 3377ms 0ms swift 5.7.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 285ms 0.5ms 5.3MB 273ms 0ms swift 5.7.3
julia 2-m.jl 533ms 3.6ms 212.9MB 707ms 110ms julia 1.8.5

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3-m.swift 390ms 3.2ms 20.9MB 687ms 10ms swift 5.7.3
julia 7-m.jl 624ms 7.1ms 298.7MB 857ms 147ms julia 1.8.5

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 58ms 0.9ms 14.6MB 53ms 3ms swift 5.7.3
julia 7.jl 452ms 0.1ms 222.8MB 543ms 113ms julia 1.8.5

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 1.8ms 0.1ms 2.3MB 0ms 0ms swift 5.7.3
julia 1.jl 181ms 7.2ms 167.3MB 124ms 62ms julia/aot 1.8.5
julia 1.jl 192ms 1.3ms 171.1MB 118ms 90ms julia 1.8.5

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 1110ms 2.3ms 271.6MB 1483ms 130ms julia 1.8.5
swift 2-m.swift 2299ms 268ms 42.5MB 4253ms 23ms swift 5.7.3

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 381ms 27ms 33.6MB 643ms 13ms swift 5.7.3
julia 8.jl 762ms 3.6ms 263.1MB 840ms 143ms julia 1.8.5

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 426ms 0.2ms 5.1MB 410ms 0ms swift 5.7.3
julia 7.jl 548ms 2.6ms 168.3MB 510ms 110ms julia/aot 1.8.5
julia 7.jl 704ms 4.6ms 223.7MB 650ms 127ms julia 1.8.5

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 45ms 0.5ms 5.1MB 37ms 0ms swift 5.7.3
julia 7.jl 244ms 1.8ms 168.0MB 217ms 97ms julia/aot 1.8.5
julia 7.jl 390ms 5.7ms 228.4MB 370ms 100ms julia 1.8.5

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 787ms 3.7ms 177.6MB 747ms 120ms julia 1.8.5
julia 1.jl 1376ms 7.8ms 262.4MB 1283ms 167ms julia 1.8.5
swift 1.swift timeout 0.0ms 6.4MB 4953ms 13ms swift 5.7.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 348ms 5.3ms 176.1MB 303ms 123ms julia 1.8.5
julia 1.jl 783ms 32ms 261.5MB 710ms 137ms julia 1.8.5
swift 1.swift 2571ms 3.4ms 6.2MB 2553ms 3ms swift 5.7.3