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
containers 0 108 0.000
fib_iter 8 888 0.009
modules 2 185 0.010
fib_recursive 11 878 0.012
loops 4 295 0.012
asdl_generated 11 378 0.029
parse 26 773 0.034
scoped_resource 44 1,013 0.043
files 4 70 0.055
tuple_return_value 16 195 0.082
length 41 204 0.200
classes 3 16 0.207
escape 94 342 0.274
cartesian 90 327 0.276
varargs 12 24 0.510
cgi 264 514 0.513
control_flow 212 113 1.872

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.9 0.41
parse 3.8 7.7 0.49
escape 3.5 6.9 0.51
loops 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
scoped_resource 3.8 7.1 0.54
fib_recursive 3.7 6.8 0.54
length 3.7 6.8 0.54
control_flow 3.8 6.9 0.55
files 3.8 6.9 0.55
modules 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
fib_iter 3.7 6.7 0.55
containers 28.4 47.8 0.59
varargs 5.5 7.1 0.78

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 4 0.000
classes 0 16 0.000
control_flow 0 4 0.000
fib_iter 0 8 0.000
fib_recursive 0 12 0.000
loops 0 4 0.000
parse 4 8 0.463
files 4 8 0.492
length 4 8 0.511
containers 15 28 0.552
scoped_resource 4 4 0.993
varargs 54 49 1.105
escape 12 8 1.537
cgi 4 0 inf
tuple_return_value 4 0 inf
cartesian 0 0 NA
modules 0 0 NA

raw benchmark files