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
loops 0 293 0.000
fib_recursive 7 937 0.008
fib_iter 8 871 0.009
modules 2 175 0.010
asdl_generated 7 382 0.019
parse 26 770 0.034
scoped_resource 40 1,028 0.039
files 4 73 0.053
containers 12 114 0.102
tuple_return_value 20 189 0.107
classes 3 20 0.169
length 36 201 0.179
cartesian 91 328 0.278
escape 103 345 0.299
cgi 255 512 0.499
varargs 23 23 1.013
control_flow 207 103 2.000

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.6 0.42
parse 3.8 7.5 0.51
files 3.7 7.1 0.52
loops 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
cartesian 3.5 6.8 0.52
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
escape 3.7 6.9 0.53
control_flow 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
tuple_return_value 3.8 6.9 0.55
fib_iter 3.9 6.9 0.57
containers 28.5 47.8 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
cgi 0 4 0.000
classes 0 12 0.000
control_flow 0 12 0.000
fib_iter 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 4 0.000
containers 4 24 0.159
fib_recursive 4 12 0.301
parse 4 8 0.460
escape 4 8 0.500
varargs 43 50 0.857
files 4 4 0.948
length 8 8 0.994
loops 4 4 1.018
scoped_resource 8 4 1.982
asdl_generated 4 0 inf

raw benchmark files