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 889 0.008
modules 2 177 0.010
fib_recursive 11 876 0.012
loops 4 290 0.013
asdl_generated 11 373 0.029
parse 25 772 0.033
scoped_resource 48 1,038 0.046
containers 8 133 0.058
tuple_return_value 20 189 0.106
files 8 69 0.109
classes 3 20 0.160
length 45 200 0.223
cartesian 86 331 0.260
escape 101 351 0.288
cgi 254 514 0.494
control_flow 208 107 1.951
varargs 27 4 6.878

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
escape 3.4 7.1 0.48
parse 3.8 7.6 0.50
asdl_generated 3.7 7.1 0.52
cgi 3.7 7.1 0.52
modules 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
loops 3.8 7.2 0.53
cartesian 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
length 3.8 7.1 0.54
control_flow 3.8 6.9 0.55
fib_iter 3.8 6.9 0.55
files 3.8 6.9 0.55
tuple_return_value 3.8 6.8 0.56
containers 28.7 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 12 0.000
cgi 0 8 0.000
classes 0 12 0.000
control_flow 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
length 0 12 0.000
loops 0 8 0.000
modules 0 8 0.000
scoped_resource 0 4 0.000
tuple_return_value 0 4 0.000
containers 8 24 0.329
cartesian 4 8 0.491
parse 4 8 0.528
varargs 39 68 0.578
escape 8 4 2.027

raw benchmark files