Swift VS Perl benchmarks

Current benchmark data was generated on Wed Sep 28 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 3385ms 0.2ms 5.1MB 3373ms 0ms swift 5.7.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 285ms 0.9ms 5.1MB 280ms 0ms swift 5.7.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3-m.swift 365ms 3.0ms 21.1MB 660ms 0ms swift 5.7.0
perl 1.pl 4468ms 9.7ms 11.0MB 4450ms 0ms perl 5.36.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 57ms 0.8ms 14.8MB 60ms 0ms swift 5.7.0
perl 1.pl 458ms 5.1ms 6.7MB 447ms 0ms perl 5.36.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 2.1ms 0.7ms 2.4MB 0ms 0ms swift 5.7.0
perl 1.pl 2.7ms 0.5ms 5.0MB 0ms 0ms perl 5.36.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 2319ms 337ms 52.2MB 3893ms 27ms swift 5.7.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 361ms 12ms 33.6MB 610ms 10ms swift 5.7.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 433ms 13ms 5.1MB 427ms 0ms swift 5.7.0
perl 2.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 45ms 0.3ms 5.1MB 37ms 0ms swift 5.7.0
perl 2.pl 3222ms 3.3ms 6.6MB 3210ms 0ms perl 5.36.0

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.7.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 2636ms 19ms 6.7MB 2607ms 3ms swift 5.7.0