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_iter 8 888 0.009
asdl_generated 4 405 0.009
modules 2 179 0.010
fib_recursive 11 881 0.012
loops 4 288 0.013
parse 26 757 0.034
scoped_resource 47 1,038 0.045
files 4 69 0.058
containers 8 109 0.072
tuple_return_value 16 197 0.083
classes 4 28 0.131
length 46 201 0.227
cartesian 91 340 0.266
escape 103 347 0.296
varargs 12 24 0.516
cgi 265 509 0.520
control_flow 210 107 1.960

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.3 10.8 0.40
parse 3.8 7.5 0.51
escape 3.5 6.9 0.51
cartesian 3.7 6.9 0.53
cgi 3.7 6.9 0.53
files 3.7 6.9 0.53
tuple_return_value 3.7 6.9 0.53
control_flow 3.8 7.1 0.54
loops 3.8 7.1 0.54
asdl_generated 3.7 6.8 0.54
fib_iter 3.8 6.9 0.55
fib_recursive 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
scoped_resource 3.8 6.9 0.55
containers 28.5 47.7 0.60
varargs 5.5 6.9 0.79

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cartesian 0 4 0.000
classes 0 4 0.000
control_flow 0 8 0.000
fib_iter 0 8 0.000
fib_recursive 0 8 0.000
length 0 8 0.000
loops 0 8 0.000
modules 0 16 0.000
scoped_resource 0 8 0.000
containers 8 27 0.288
parse 4 8 0.463
files 4 8 0.494
tuple_return_value 4 8 0.508
asdl_generated 7 8 0.906
escape 4 4 0.989
cgi 4 4 1.001
varargs 54 48 1.119

raw benchmark files