Swift VS Perl benchmarks

Current benchmark data was generated on Mon Feb 06 2023, 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
swift 1.swift 2924ms 4.7ms 2.4MB 2910ms 0ms swift 5.7.3

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 245ms 1.3ms 2.4MB 230ms 0ms swift 5.7.3

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 405ms 28ms 22.7MB 537ms 10ms swift 5.7.3
perl 1.pl 4364ms 36ms 11.0MB 4347ms 3ms perl 5.36.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 3.swift 65ms 1.8ms 14.7MB 40ms 7ms swift 5.7.3
perl 1.pl 446ms 3.6ms 6.5MB 430ms 0ms perl 5.36.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
perl 1.pl 3.3ms 0.7ms 3.8MB 0ms 0ms perl 5.36.0
swift 1.swift 3.4ms 0.1ms 0.0MB 0ms 0ms swift 5.7.3

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 2-m.swift 2227ms 12ms 42.1MB 4180ms 30ms 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 393ms 32ms 33.6MB 630ms 17ms swift 5.7.3

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 453ms 6.5ms 5.2MB 443ms 0ms swift 5.7.3
perl 2.pl timeout 0.0ms 6.3MB 4987ms 0ms perl 5.36.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 7.swift 49ms 2.8ms 5.2MB 40ms 0ms swift 5.7.3
perl 2.pl 3096ms 23ms 6.1MB 3080ms 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 6.7MB 4970ms 10ms swift 5.7.3

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
swift 1.swift 2616ms 0.1ms 6.3MB 2600ms 3ms swift 5.7.3