Typescript VS Perl benchmarks

Current benchmark data was generated on Mon Oct 03 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.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 3547ms 183ms 198.4MB 3437ms 587ms deno 1.26.0
perl 1.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 141ms 6.4ms 51.6MB 137ms 10ms deno 1.26.0
perl 1.pl 2233ms 28ms 14.3MB 2210ms 7ms perl 5.36.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 2019ms 9.6ms 70.4MB 2047ms 13ms deno 1.26.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 195ms 1.1ms 42.6MB 167ms 3ms deno 1.26.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 2111ms 3.2ms 39.1MB 2013ms 100ms deno 1.26.0
perl 1.pl 4504ms 60ms 11.1MB 4493ms 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 29ms 37.1MB 243ms 13ms deno 1.26.0
perl 1.pl 458ms 4.3ms 6.7MB 443ms 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 2.5ms 0.2ms 5.0MB 0ms 0ms perl 5.36.0
typescript 1.ts 30ms 2.2ms 29.4MB 18ms 0ms deno 1.26.0

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 2.ts 1041ms 2.8ms 142.7MB 1263ms 280ms deno 1.26.0
typescript 1.ts 1049ms 9.8ms 138.2MB 1263ms 280ms deno 1.26.0
typescript 2-tls.ts 1279ms 8.9ms 148.7MB 1493ms 323ms deno 1.26.0
typescript 1-http2.ts 1405ms 23ms 144.4MB 1597ms 350ms deno 1.26.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 229ms 4.9ms 77.0MB 180ms 60ms deno 1.26.0
typescript 2.ts 230ms 8.9ms 73.1MB 183ms 57ms deno 1.26.0
typescript 1-http2.ts 272ms 6.8ms 77.8MB 213ms 63ms deno 1.26.0
typescript 2-tls.ts 416ms 1.9ms 84.2MB 357ms 63ms deno 1.26.0

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 154ms 1.0ms 66.7MB 140ms 17ms deno 1.26.0

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 1146ms 8.2ms 265.6MB 1243ms 83ms deno 1.26.0

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 2.ts 653ms 1.1ms 45.3MB 647ms 7ms deno 1.26.0
typescript 1.ts 1079ms 1.8ms 44.8MB 1063ms 7ms deno 1.26.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 2.ts 1867ms 2.7ms 53.4MB 1857ms 10ms deno 1.26.0
typescript 1.ts 3163ms 15ms 53.0MB 3147ms 13ms deno 1.26.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 2.ts 339ms 2.3ms 39.2MB 327ms 3ms deno 1.26.0
typescript 1.ts 371ms 1.7ms 38.9MB 357ms 7ms deno 1.26.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 664ms 1.4ms 91.4MB 673ms 30ms deno 1.26.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 177ms 1.6ms 59.6MB 180ms 10ms deno 1.26.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 6.ts 669ms 19ms 38.7MB 660ms 0ms deno 1.26.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
typescript 6.ts 100ms 0.8ms 38.5MB 87ms 3ms deno 1.26.0
perl 2.pl 3226ms 23ms 6.3MB 3213ms 0ms perl 5.36.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 3.ts timeout 0.0ms 0.0MB 0ms 0ms deno 1.26.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 3.ts 1608ms 8.6ms 57.3MB 1610ms 63ms deno 1.26.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 2614ms 1.0ms 39.6MB 2620ms 0ms deno 1.26.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 1.ts 717ms 40ms 39.5MB 707ms 3ms deno 1.26.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 4842ms 3.2ms 38.4MB 4830ms 0ms deno 1.26.0
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 1242ms 1.3ms 38.3MB 1230ms 7ms deno 1.26.0
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
typescript 7.ts 340ms 0.2ms 38.1MB 327ms 3ms deno 1.26.0
perl 4.pl timeout 0.0ms 0.0MB 0ms 0ms perl 5.36.0