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.009 |
modules | 2 | 171 | 0.012 |
fib_recursive | 11 | 881 | 0.012 |
loops | 4 | 294 | 0.013 |
asdl_generated | 11 | 371 | 0.029 |
parse | 29 | 763 | 0.038 |
scoped_resource | 43 | 1,040 | 0.041 |
tuple_return_value | 16 | 190 | 0.085 |
files | 7 | 77 | 0.096 |
containers | 13 | 113 | 0.111 |
classes | 3 | 27 | 0.123 |
length | 41 | 205 | 0.199 |
escape | 90 | 353 | 0.254 |
cartesian | 86 | 327 | 0.264 |
cgi | 265 | 509 | 0.521 |
control_flow | 210 | 107 | 1.968 |
varargs | 16 | 4 | 3.948 |
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.7 | 0.49 |
asdl_generated | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
fib_recursive | 3.5 | 6.9 | 0.51 |
loops | 3.8 | 7.2 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
modules | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
length | 3.7 | 6.8 | 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 |
scoped_resource | 3.8 | 6.9 | 0.55 |
containers | 28.3 | 47.8 | 0.59 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
classes | 0 | 4 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
modules | 0 | 12 | 0.000 |
parse | 0 | 12 | 0.000 |
containers | 4 | 27 | 0.153 |
cgi | 4 | 12 | 0.334 |
scoped_resource | 4 | 8 | 0.489 |
cartesian | 4 | 8 | 0.492 |
varargs | 51 | 68 | 0.755 |
tuple_return_value | 4 | 4 | 1.000 |
length | 4 | 4 | 1.036 |
escape | 16 | 4 | 4.070 |
files | 0 | 0 | NA |
loops | 0 | 0 | NA |