Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 23 | 0.000 |
fib_iter | 8 | 886 | 0.009 |
modules | 2 | 180 | 0.010 |
fib_recursive | 11 | 884 | 0.012 |
loops | 4 | 308 | 0.013 |
parse | 23 | 777 | 0.030 |
asdl_generated | 11 | 376 | 0.030 |
scoped_resource | 42 | 1,026 | 0.041 |
containers | 8 | 116 | 0.073 |
tuple_return_value | 21 | 207 | 0.099 |
files | 9 | 74 | 0.125 |
length | 44 | 205 | 0.214 |
cartesian | 90 | 324 | 0.277 |
escape | 108 | 350 | 0.309 |
cgi | 258 | 506 | 0.510 |
varargs | 24 | 19 | 1.213 |
control_flow | 209 | 109 | 1.924 |
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 |
parse | 3.8 | 7.6 | 0.50 |
fib_recursive | 3.7 | 7.1 | 0.52 |
loops | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
cartesian | 0 | 16 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
files | 0 | 4 | 0.000 |
length | 0 | 4 | 0.000 |
modules | 0 | 8 | 0.000 |
containers | 8 | 24 | 0.352 |
classes | 4 | 8 | 0.464 |
varargs | 43 | 55 | 0.794 |
cgi | 12 | 12 | 0.996 |
scoped_resource | 8 | 4 | 1.898 |
parse | 8 | 4 | 1.917 |
escape | 0 | 0 | NA |
loops | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |