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 296 0.000
fib_iter 8 892 0.008
modules 2 171 0.010
fib_recursive 11 987 0.011
asdl_generated 7 367 0.020
parse 26 769 0.034
containers 4 110 0.036
scoped_resource 43 1,080 0.040
files 4 61 0.064
classes 3 31 0.108
tuple_return_value 20 185 0.109
length 44 204 0.217
cartesian 86 349 0.246
escape 103 347 0.296
varargs 8 16 0.483
cgi 248 508 0.488
control_flow 209 108 1.945

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
cartesian 3.5 7.1 0.50
escape 3.5 7.1 0.50
fib_iter 3.5 6.9 0.51
control_flow 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
tuple_return_value 3.7 7.1 0.52
parse 3.9 7.5 0.53
asdl_generated 3.7 6.9 0.53
cgi 3.7 6.9 0.53
loops 3.8 7.1 0.54
fib_recursive 3.8 6.9 0.55
files 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
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
control_flow 0 8 0.000
fib_iter 0 4 0.000
fib_recursive 0 8 0.000
length 0 8 0.000
modules 0 12 0.000
tuple_return_value 0 12 0.000
asdl_generated 4 16 0.225
files 4 15 0.255
parse 4 12 0.310
loops 4 8 0.464
containers 12 24 0.492
cgi 4 8 0.500
escape 4 8 0.515
cartesian 4 8 0.515
scoped_resource 4 4 0.973
varargs 58 56 1.034
classes 0 0 NA

raw benchmark files