Perl VS Typescript benchmarks

Current benchmark data was generated on Sun Jan 29 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 3653ms 166ms 149.5MB 3550ms 543ms deno 1.30.0
perl 1.pl timeout 0.0ms 77.7MB 4963ms 17ms perl 5.36.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 155ms 13ms 56.9MB 177ms 3ms deno 1.30.0
perl 1.pl 2232ms 31ms 14.1MB 2213ms 0ms perl 5.36.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 2032ms 2.8ms 38.7MB 1927ms 113ms deno 1.30.0
perl 1.pl 4617ms 201ms 10.9MB 4607ms 0ms perl 5.36.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 264ms 46ms 39.0MB 230ms 17ms deno 1.30.0
perl 1.pl 471ms 8.6ms 6.7MB 457ms 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 4.8ms 0.1ms 4.0MB 0ms 0ms perl 5.36.0
typescript 1.ts 26ms 1.3ms 31.8MB 14ms 2ms deno 1.30.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 6.ts 653ms 21ms 37.8MB 637ms 7ms deno 1.30.0
perl 2.pl timeout 0.0ms 6.4MB 4987ms 0ms perl 5.36.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 6.ts 96ms 1.8ms 37.9MB 83ms 0ms deno 1.30.0
perl 2.pl 3264ms 72ms 6.3MB 3247ms 3ms perl 5.36.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 4864ms 45ms 39.0MB 4833ms 3ms deno 1.30.0
perl 4.pl timeout 0.0ms 8.1MB 9860ms 7ms perl 5.36.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 1237ms 3.1ms 38.3MB 1227ms 3ms deno 1.30.0
perl 4.pl timeout 0.0ms 9.5MB 9720ms 3ms perl 5.36.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 368ms 57ms 37.9MB 327ms 7ms deno 1.30.0
perl 4.pl timeout 0.0ms 8.4MB 9707ms 3ms perl 5.36.0