Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
fib_iter | 8 | 885 | 0.009 |
modules | 2 | 187 | 0.009 |
fib_recursive | 11 | 883 | 0.012 |
loops | 4 | 284 | 0.013 |
asdl_generated | 11 | 374 | 0.029 |
parse | 30 | 768 | 0.039 |
scoped_resource | 39 | 1,021 | 0.039 |
containers | 4 | 94 | 0.040 |
files | 4 | 68 | 0.054 |
tuple_return_value | 16 | 270 | 0.059 |
classes | 3 | 23 | 0.139 |
length | 32 | 199 | 0.160 |
cartesian | 86 | 331 | 0.260 |
escape | 101 | 349 | 0.290 |
cgi | 266 | 505 | 0.526 |
varargs | 27 | 16 | 1.733 |
control_flow | 208 | 112 | 1.863 |
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.8 | 0.41 |
parse | 3.7 | 7.5 | 0.49 |
escape | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
cartesian | 3.7 | 6.8 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
tuple_return_value | 3.9 | 6.9 | 0.57 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 8 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 4 | 0.000 |
parse | 0 | 8 | 0.000 |
containers | 11 | 39 | 0.288 |
files | 4 | 8 | 0.458 |
varargs | 39 | 55 | 0.707 |
escape | 4 | 4 | 0.971 |
cartesian | 4 | 4 | 0.983 |
scoped_resource | 8 | 8 | 0.985 |
cgi | 4 | 4 | 0.990 |
length | 12 | 12 | 1.001 |
tuple_return_value | 4 | 0 | inf |
fib_recursive | 0 | 0 | NA |