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 | 892 | 0.008 |
modules | 2 | 173 | 0.010 |
fib_recursive | 11 | 879 | 0.012 |
loops | 4 | 286 | 0.013 |
asdl_generated | 11 | 368 | 0.029 |
parse | 30 | 786 | 0.038 |
scoped_resource | 47 | 1,029 | 0.045 |
containers | 8 | 116 | 0.067 |
tuple_return_value | 16 | 188 | 0.085 |
files | 7 | 73 | 0.101 |
classes | 3 | 22 | 0.147 |
length | 33 | 207 | 0.160 |
cartesian | 86 | 325 | 0.266 |
escape | 102 | 352 | 0.290 |
cgi | 265 | 508 | 0.522 |
varargs | 16 | 24 | 0.650 |
control_flow | 205 | 107 | 1.916 |
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.5 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
cgi | 0 | 12 | 0.000 |
classes | 0 | 9 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 8 | 0.000 |
scoped_resource | 0 | 8 | 0.000 |
containers | 8 | 20 | 0.386 |
cartesian | 4 | 8 | 0.489 |
control_flow | 4 | 8 | 0.497 |
tuple_return_value | 4 | 4 | 0.993 |
varargs | 51 | 48 | 1.056 |
length | 11 | 4 | 2.769 |
escape | 4 | 0 | inf |