All C benchmarks

Current benchmark data was generated on Sun Oct 17 2021, full log can be found HERE

CONTRIBUTIONS are WELCOME!

binarytrees

Input: 18

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.c 302ms 40ms 26.7MB 433ms 27ms gcc 11.2.0
2.c 344ms 7.3ms 27.5MB 607ms 30ms clang 13.0.1

Input: 14

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.c 19ms 2.9ms 4.0MB 17ms 0ms gcc 11.2.0
2.c 22ms 2.2ms 4.8MB 27ms 0ms clang 13.0.1

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.c 2.3ms 0.7ms 1.3MB 0ms 0ms clang 13.0.1
1.c 2.5ms 1.0ms 2.2MB 0ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
1.c 3.6ms 2.7ms 2.6MB 0ms 0ms gcc 11.2.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
8.c 321ms 0.2ms 1.2MB 310ms 0ms gcc 11.2.0
8.c 334ms 4.7ms 1.4MB 323ms 0ms clang 13.0.1
5.c 377ms 1.1ms 1.1MB 370ms 0ms gcc 11.2.0
2.c 386ms 2.5ms 1.2MB 377ms 0ms gcc 11.2.0
5.c 422ms 4.7ms 1.2MB 407ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
8.c 423ms 7.2ms 1.2MB 413ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
5.c 425ms 2.5ms 1.3MB 417ms 0ms clang 13.0.1
2.c 426ms 1.9ms 1.1MB 413ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
2.c 463ms 1.1ms 1.3MB 450ms 0ms clang 13.0.1

Input: 500000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
8.c 34ms 0.7ms 1.2MB 23ms 0ms gcc 11.2.0
8.c 35ms 1.6ms 1.4MB 27ms 0ms clang 13.0.1
5.c 40ms 0.7ms 1.3MB 30ms 0ms gcc 11.2.0
2.c 41ms 0.7ms 1.2MB 30ms 0ms gcc 11.2.0
2.c 44ms 0.1ms 1.2MB 40ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
5.c 45ms 0.5ms 1.3MB 37ms 0ms clang 13.0.1
5.c 45ms 0.8ms 1.1MB 37ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09
2.c 49ms 0.6ms 1.3MB 40ms 0ms clang 13.0.1
8.c 49ms 3.1ms 1.2MB 40ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09

nsieve

Input: 12

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.c 1031ms 32ms 41.2MB 983ms 20ms clang 13.0.1
1.c 1038ms 50ms 41.4MB 1003ms 17ms gcc 11.2.0
1.c 1051ms 28ms 40.9MB 1023ms 10ms zigcc 0.9.0-dev.1387+6f30c8c09

Input: 10

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.c 112ms 0.5ms 11.8MB 100ms 0ms clang 13.0.1
1.c 114ms 0.4ms 12.0MB 100ms 0ms gcc 11.2.0
1.c 115ms 1.8ms 11.6MB 100ms 0ms zigcc 0.9.0-dev.1387+6f30c8c09

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
4.c 1318ms 20ms 1.2MB 2543ms 3ms gcc 11.2.0
6.c 1403ms 1.1ms 1.2MB 2757ms 0ms gcc 11.2.0
6.c 1576ms 1.9ms 3.3MB 3093ms 7ms clang 13.0.1
5.c 1597ms 1.8ms 2.7MB 3143ms 0ms gcc 11.2.0
4.c 1669ms 13ms 3.3MB 3270ms 0ms clang 13.0.1
3.c 1872ms 3.1ms 3.3MB 3683ms 0ms clang 13.0.1
5.c 1925ms 17ms 3.3MB 3767ms 3ms clang 13.0.1
3.c 1979ms 4.5ms 1.3MB 3887ms 0ms gcc 11.2.0

Input: 4000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
4.c 331ms 0.5ms 1.2MB 637ms 0ms gcc 11.2.0
6.c 357ms 1.1ms 1.3MB 687ms 0ms gcc 11.2.0
6.c 402ms 0.1ms 3.2MB 780ms 0ms clang 13.0.1
5.c 411ms 6.8ms 1.1MB 790ms 0ms gcc 11.2.0
4.c 425ms 7.1ms 3.2MB 813ms 0ms clang 13.0.1
3.c 474ms 0.5ms 3.2MB 917ms 0ms clang 13.0.1
5.c 482ms 3.8ms 3.3MB 930ms 0ms clang 13.0.1
3.c 501ms 1.8ms 1.2MB 970ms 0ms gcc 11.2.0

Input: 1000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
4.c 26ms 0.7ms 1.3MB 40ms 0ms gcc 11.2.0
6.c 27ms 0.5ms 1.3MB 40ms 0ms gcc 11.2.0
6.c 29ms 0.9ms 3.2MB 50ms 0ms clang 13.0.1
5.c 33ms 2.0ms 1.3MB 50ms 0ms gcc 11.2.0
4.c 34ms 0.2ms 3.2MB 50ms 0ms clang 13.0.1
3.c 35ms 0.8ms 3.3MB 60ms 0ms clang 13.0.1
5.c 37ms 0.9ms 3.1MB 57ms 0ms clang 13.0.1
3.c 41ms 2.5ms 1.3MB 67ms 0ms gcc 11.2.0