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 282 0.000
fib_iter 4 895 0.005
asdl_generated 4 377 0.010
modules 2 175 0.010
fib_recursive 11 888 0.012
parse 25 775 0.033
scoped_resource 43 1,074 0.040
containers 8 104 0.075
tuple_return_value 20 187 0.109
files 8 69 0.111
classes 3 19 0.168
length 37 207 0.179
cartesian 90 336 0.268
escape 106 347 0.307
cgi 261 518 0.503
varargs 28 36 0.759
control_flow 210 105 1.992

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
asdl_generated 3.5 7.1 0.50
loops 3.5 7.1 0.50
parse 3.8 7.6 0.50
scoped_resource 3.5 7.1 0.50
cgi 3.7 7.1 0.52
escape 3.7 7.1 0.52
tuple_return_value 3.7 7.1 0.52
fib_iter 3.7 6.9 0.53
fib_recursive 3.7 6.9 0.53
files 3.8 7.1 0.54
cartesian 3.8 6.9 0.55
length 3.8 6.9 0.55
modules 3.8 6.9 0.55
control_flow 3.9 6.9 0.57
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
cartesian 0 4 0.000
classes 0 12 0.000
control_flow 0 8 0.000
escape 0 12 0.000
fib_recursive 0 4 0.000
files 0 8 0.000
modules 0 8 0.000
tuple_return_value 0 8 0.000
containers 8 32 0.245
loops 4 12 0.316
scoped_resource 4 8 0.534
asdl_generated 8 8 0.938
fib_iter 4 4 1.009
parse 4 4 1.053
varargs 39 36 1.085
length 8 4 2.073
cgi 8 0 inf

raw benchmark files