mycpp Code Generation

Measure the speedup from mycpp, and the resource usage.

Source code: oil/mycpp/examples

User Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
fib_recursive 8 934 0.008
fib_iter 8 907 0.008
modules 2 184 0.010
loops 4 290 0.015
asdl_generated 11 380 0.029
parse 32 766 0.042
scoped_resource 47 1,016 0.047
tuple_return_value 12 180 0.068
containers 11 119 0.090
files 9 77 0.117
classes 4 24 0.161
length 43 201 0.214
cartesian 82 326 0.251
escape 95 352 0.271
cgi 261 514 0.508
varargs 13 20 0.630
control_flow 207 112 1.843

Max Resident Set Size (MB)

Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).

example name C++ Python C++ : Python
classes 4.5 10.7 0.41
parse 3.8 7.6 0.50
escape 3.7 7.1 0.52
modules 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
asdl_generated 3.7 6.9 0.53
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
files 3.8 7.1 0.54
loops 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.6 47.8 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
classes 0 12 0.000
control_flow 0 4 0.000
fib_iter 0 4 0.000
loops 0 8 0.000
modules 0 8 0.000
parse 0 12 0.000
scoped_resource 0 8 0.000
containers 7 24 0.299
fib_recursive 4 12 0.318
length 4 8 0.497
tuple_return_value 8 16 0.523
varargs 54 56 0.975
cgi 8 8 1.000
cartesian 8 8 1.016
escape 12 4 2.980
files 0 0 NA

raw benchmark files