Swift VS Julia benchmarks

Current benchmark data was generated on Wed May 25 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -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 1764ms 26ms 215.3MB 2897ms 143ms julia 1.7.2
swift 1.swift 2827ms 209ms 5.2MB 2813ms 0ms swift 5.6.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 259ms 3.3ms 5.2MB 247ms 0ms swift 5.6.1
julia 2.jl 629ms 11ms 216.5MB 803ms 130ms julia 1.7.2

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3-m.swift 300ms 5.8ms 21.0MB 530ms 10ms swift 5.6.1
julia 7-m.jl 638ms 18ms 291.4MB 853ms 153ms julia 1.7.2

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 47ms 1.6ms 14.7MB 43ms 0ms swift 5.6.1
julia 7.jl 497ms 5.9ms 218.6MB 580ms 120ms julia 1.7.2

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 3.0ms 1.8ms 2.4MB 0ms 0ms swift 5.6.1
julia 1.jl 211ms 8.7ms 171.0MB 128ms 82ms julia 1.7.2

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 8.jl 1311ms 33ms 268.3MB 1580ms 167ms julia 1.7.2
swift 2-m.swift 1976ms 37ms 42.7MB 3600ms 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 357ms 25ms 31.9MB 557ms 23ms swift 5.6.1
julia 8.jl 906ms 41ms 256.4MB 993ms 153ms julia 1.7.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 428ms 28ms 5.4MB 420ms 0ms swift 5.6.1
julia 7.jl 765ms 2.6ms 219.1MB 713ms 133ms julia 1.7.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 43ms 0.7ms 5.4MB 33ms 0ms swift 5.6.1
julia 7.jl 485ms 2.5ms 228.0MB 427ms 147ms julia 1.7.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
julia 3.jl 728ms 47ms 179.2MB 677ms 137ms julia 1.7.2
julia 1.jl 1708ms 59ms 256.9MB 1603ms 190ms julia 1.7.2
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
julia 3.jl 365ms 17ms 181.2MB 320ms 130ms julia 1.7.2
julia 1.jl 925ms 30ms 258.0MB 837ms 163ms julia 1.7.2
swift 1.swift 3278ms 2.4ms 6.4MB 3260ms 0ms swift 5.6.1