Last active
May 6, 2019 14:30
-
-
Save MrSmith33/84d0ba43d4e67761a71c63f2eee1587d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 100 1к 10к 100к 1М 10M | |
TCC 0.9.27 8.5 8.6 8.7 12 48 426 8749 | |
tiny_jit 19 20 21 30 135 1172 11600 | |
MSVC 2017 82 82 90 114 503 45000 2116000 | |
DMD 2.083 94 95 98 141 594 5510 OOM | |
Clang 7.0.1 107 109 123 290 2000 18500 183000 | |
Go 1.12.4 156 154 171 349 1921 18096 318963 | |
Rust 1.34.1 165 169 197 516 3896 39260 852222 | |
GCC 8.3.0 196 199 241 682 5718 199000 26920000 | |
GCC 4.8.3 125 130 178 665 6420 269000 ICE | |
CMD / compile time / exe size / RAM peak usage | |
tiny_jit 09.03.2019 300KB/1MB | |
tiny_jit ./1.c 19ms 1.5KB | |
tiny_jit ./10.c 19ms 2KB | |
tiny_jit ./100.c 21ms 9.5KB | |
tiny_jit ./1000.c 38ms 83.5KB | |
tiny_jit ./10000.c 201ms 821KB | |
tiny_jit ./100000.c 2352ms 8.2MB | |
tiny_jit ./1000000.c 30s exe 82.0MB (10GB RAM) | |
GC | |
tiny_jit 28.03.2019 300KB/1MB | |
tiny_jit ./1.c 21ms 1.5KB | |
tiny_jit ./10.c 21ms 2KB | |
tiny_jit ./100.c 24ms 9.5KB | |
tiny_jit ./1000.c 37ms 83.5KB | |
tiny_jit ./10000.c 200ms 821KB | |
tiny_jit ./100000.c 2005ms 8.2MB | |
tiny_jit ./1000000.c 30s exe 82.0MB (10GB RAM) | |
Arenas | |
tiny_jit 10.04.2019 300KB/1MB | |
tiny_jit ./1.c 19ms release 462us | |
tiny_jit ./10.c 20ms release 466us | |
tiny_jit ./100.c 21ms release 556us | |
tiny_jit ./1000.c 30ms release 1.1ms | |
tiny_jit ./10000.c 135ms release 6ms | |
tiny_jit ./100000.c 1172ms release 54ms | |
tiny_jit ./1000000.c 11.6s release 521ms (7.6GB RAM) | |
DMD 2.083 20MB/200MB | |
dmd -m64 ./d/a1.d 94ms 380KB | |
dmd -m64 ./d/a10.d 95ms 380KB | |
dmd -m64 ./d/a100.d 98ms 380KB | |
dmd -m64 ./d/a1000.d 141ms 380KB | |
dmd -m64 ./d/a10000.d 594ms 380KB | |
dmd -m64 ./d/a100000.d 5510ms 380KB | |
dmd -m64 ./d/a1000000.d OOM | |
Microsoft C/C++ 2017 2.5GB | |
cl 19.16.27025.1 | |
cl ./c/a1.c 82ms 92KB | |
cl ./c/a10.c 82ms 93KB | |
cl ./c/a100.c 90ms 104KB | |
cl ./c/a1000.c 114ms 206KB | |
cl ./c/a10000.c 503ms 1,225 MB | |
cl ./c/a100000.c 45s 11,421 MB | |
cl ./c/a1000000.c 2116s(35min) exe 113,368MB (1.6-1.7GB RAM) | |
Clang 7.0.1 100MB/1GB | |
clang ./c/a1.c 107ms 92KB | |
clang ./c/a10.c 109ms 94KB | |
clang ./c/a100.c 123ms 104KB | |
clang ./c/a1000.c 290ms 206KB | |
clang ./c/a10000.c 2s 1,225 MB | |
clang ./c/a100000.c 18.5s 11,421MB | |
clang ./c/a1000000.c 183s exe 113MB (8GB RAM) | |
Mingw GCC 4.8.3 | |
gcc ./c/a1.c 125ms 38.9KB | |
gcc ./c/a10.c 130ms 39.7KB | |
gcc ./c/a100.c 178ms 50.3KB | |
gcc ./c/a1000.c 665ms 157KB | |
gcc ./c/a10000.c 6.420s 1.2MB 320MB | |
gcc ./c/a100000.c 269s(5min) 11.8MB 1.875GB | |
gcc ./c/a1000000.c internal compiler error | |
a1000000.c: In function 'fibonacci891039': | |
a1000000.c:8910393:1: internal compiler error: in gt_ggc_m_S, at ggc-page.c:1410 | |
} | |
^ | |
Cygwin GCC 8.3.0 | |
gcc ./c/a1.c 196ms 155KB | |
gcc ./c/a10.c 199ms 156KB | |
gcc ./c/a100.c 241ms 167KB | |
gcc ./c/a1000.c 682ms 275KB | |
gcc ./c/a10000.c 5.718s 1.33MB 230MB | |
gcc ./c/a100000.c 199s(3:19min) 12MB exe 1.9GB RAM cc1(45s) + 884MB RAM as(154s) | |
gcc ./c/a1000000.c 26920s(7:28:40h) cc1(470s = 7:50min) 12.8GB + as(26450s) 2.7GB | |
go 1.12.4 120MB/337MB | |
go tool compile -N -c 1 a1.go 52ms | |
go tool link -o a.exe a1.o 104ms | |
go tool compile -N -c 1 a10.go 52ms | |
go tool link -o a.exe a10.o 102ms | |
go tool compile -N -c 1 a100.go 69ms | |
go tool link -o a.exe a100.o 102ms | |
go tool compile -N -c 1 a1000.go 229ms | |
go tool link -o a.exe a1000.o 120ms | |
go tool compile -N -c 1 a10000.go 1.766s | |
go tool link -o a.exe a10000.o 155ms | |
go tool compile -N -c 1 a100000.go 17.4s (1.8GB RAM) | |
go tool link -o a.exe a100000.o 696ms | |
go tool compile -N -c 1 a1000000.go 312s (13GB RAM) | |
go tool link -o a.exe a1000000.o 6963ms | |
rustc 1.34.1 (fc50f328b 2019-04-24) 120MB/604MB | |
rustc a1.rs 165ms | |
rustc a10.rs 169ms | |
rustc a100.rs 197ms | |
rustc a1000.rs 516ms | |
rustc a10000.rs 3.896s | |
rustc a100000.rs 39.260s | |
rustc a1000000.rs 852.222s (12.4GB RAM) | |
tcc 0.9.27 500KB/1.5MB | |
tcc ./c/a1.c 8.5ms 2KB | |
tcc ./c/a10.c 8.6ms 3KB | |
tcc ./c/a100.c 8.5ms 12KB | |
tcc ./c/a1000.c 12ms 95KB | |
tcc ./c/a10000.c 48ms 930KB | |
tcc ./c/a100000.c 426ms 9.279KB | |
tcc ./c/a1000000.c 8.749s exe 92.776MB (550MB RAM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C | |
#define i32 int | |
#define u8 char | |
void print(i32 n){} | |
void fibonacci1() { | |
i32 lo = 0; | |
i32 hi = 1; | |
while (hi < 10000) { | |
i32 tmp = hi; | |
hi = hi + lo; | |
lo = tmp; | |
print(lo); | |
} | |
} | |
i32 main(void* hInstance, void* hPrevInstance, u8* lpCmdLine, i32 nCmdShow) { | |
return 0; | |
} | |
// D | |
alias i32 = int; | |
alias u8 = char; | |
void print(i32 n){} | |
void fibonacci1() { | |
i32 lo = 0; | |
i32 hi = 1; | |
while (hi < 10000) { | |
i32 tmp = hi; | |
hi = hi + lo; | |
lo = tmp; | |
print(lo); | |
} | |
} | |
i32 main(void) { | |
return 0; | |
} | |
// Go | |
package main | |
func print(n int){} | |
func fibonacci1() { | |
lo := 0; | |
hi := 1; | |
for hi < 10000 { | |
tmp := hi | |
hi = hi + lo | |
lo = tmp | |
print(lo) | |
} | |
} | |
func main() { | |
} | |
// Rust | |
#![allow(unused)] | |
fn print(n : i32){} | |
fn fibonacci1() { | |
let mut lo = 0; | |
let mut hi = 1; | |
while hi < 10000 { | |
let tmp = hi; | |
hi = hi + lo; | |
lo = tmp; | |
print(lo); | |
} | |
} | |
fn main() { | |
} | |
// Tiny JIT | |
void print(i32 n){} | |
void fibonacci1() { | |
i32 lo = 0; | |
i32 hi = 1; | |
while (hi < 10000) { | |
i32 tmp = hi; | |
hi = hi + lo; | |
lo = tmp; | |
print(lo); | |
} | |
} | |
i32 main(void* hInstance, void* hPrevInstance, u8* lpCmdLine, i32 nCmdShow) { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment