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 6 888 0.007
modules 2 174 0.010
fib_recursive 11 881 0.012
loops 5 285 0.016
asdl_generated 7 376 0.017
parse 27 761 0.036
scoped_resource 44 1,046 0.042
containers 12 111 0.106
tuple_return_value 20 184 0.111
files 8 68 0.112
classes 4 23 0.156
length 45 203 0.221
escape 89 356 0.249
cartesian 90 332 0.272
varargs 12 24 0.496
cgi 270 519 0.520
control_flow 210 115 1.835

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.9 0.40
asdl_generated 3.5 7.1 0.50
parse 3.8 7.6 0.50
fib_iter 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
escape 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cgi 3.7 6.9 0.53
fib_recursive 3.8 7.1 0.54
loops 3.8 7.1 0.54
tuple_return_value 3.8 7.1 0.54
control_flow 3.7 6.8 0.54
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
containers 28.7 47.8 0.60
varargs 5.5 6.8 0.81

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
cgi 0 8 0.000
classes 0 8 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
length 0 4 0.000
loops 0 12 0.000
modules 0 8 0.000
tuple_return_value 0 8 0.000
containers 4 24 0.164
parse 4 8 0.485
cartesian 4 8 0.491
fib_iter 3 4 0.767
asdl_generated 7 8 0.815
varargs 56 48 1.157
control_flow 4 0 inf
escape 20 0 inf
scoped_resource 4 0 inf

raw benchmark files