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_recursive | 7 | 890 | 0.008 |
fib_iter | 8 | 889 | 0.009 |
modules | 2 | 177 | 0.010 |
loops | 4 | 294 | 0.013 |
asdl_generated | 7 | 371 | 0.019 |
parse | 22 | 761 | 0.029 |
scoped_resource | 47 | 1,053 | 0.044 |
containers | 8 | 120 | 0.065 |
tuple_return_value | 16 | 189 | 0.085 |
classes | 3 | 26 | 0.126 |
files | 9 | 64 | 0.134 |
length | 37 | 201 | 0.182 |
escape | 104 | 448 | 0.232 |
cartesian | 84 | 328 | 0.256 |
cgi | 247 | 507 | 0.488 |
varargs | 19 | 16 | 1.244 |
control_flow | 205 | 111 | 1.855 |
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.42 |
cgi | 3.4 | 6.9 | 0.49 |
fib_recursive | 3.5 | 6.9 | 0.51 |
scoped_resource | 3.7 | 7.1 | 0.52 |
parse | 3.9 | 7.5 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
control_flow | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.7 | 47.8 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 4 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
files | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 0 | 4 | 0.000 |
containers | 8 | 20 | 0.393 |
asdl_generated | 4 | 8 | 0.444 |
control_flow | 4 | 8 | 0.509 |
varargs | 47 | 55 | 0.853 |
fib_recursive | 4 | 4 | 0.894 |
parse | 7 | 8 | 0.911 |
length | 7 | 8 | 0.928 |
cgi | 4 | 4 | 0.992 |
escape | 4 | 4 | 0.997 |
cartesian | 8 | 8 | 0.999 |
tuple_return_value | 4 | 4 | 1.017 |