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 287 0.000
fib_recursive 7 873 0.008
fib_iter 7 884 0.008
modules 2 181 0.010
asdl_generated 11 392 0.028
containers 4 126 0.031
scoped_resource 35 1,036 0.034
parse 30 765 0.039
tuple_return_value 12 188 0.064
files 8 68 0.112
length 45 201 0.222
classes 3 13 0.251
cartesian 86 335 0.257
escape 94 347 0.271
cgi 267 520 0.514
varargs 25 16 1.555
control_flow 210 107 1.967

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.6 0.50
asdl_generated 3.5 6.9 0.51
cartesian 3.7 7.1 0.52
cgi 3.7 7.1 0.52
control_flow 3.7 7.1 0.52
length 3.7 7.1 0.52
scoped_resource 3.7 7.1 0.52
escape 3.7 6.9 0.53
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
modules 3.7 6.9 0.53
loops 3.8 7.1 0.54
files 3.8 6.9 0.55
tuple_return_value 3.8 6.9 0.55
containers 28.4 47.6 0.60
varargs 5.4 6.9 0.77

System Time (milliseconds)

Lower ratios are better.

example name C++ Python C++ : Python
asdl_generated 0 8 0.000
cgi 0 8 0.000
classes 0 17 0.000
control_flow 0 8 0.000
fib_iter 0 12 0.000
files 0 8 0.000
length 0 8 0.000
modules 0 4 0.000
parse 0 8 0.000
fib_recursive 4 8 0.446
loops 4 8 0.467
varargs 41 56 0.740
containers 12 12 0.947
scoped_resource 12 8 1.462
tuple_return_value 8 4 2.005
escape 12 4 3.070
cartesian 4 0 inf

raw benchmark files