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 | 880 | 0.008 |
fib_iter | 8 | 883 | 0.009 |
modules | 2 | 183 | 0.010 |
loops | 4 | 286 | 0.013 |
asdl_generated | 7 | 375 | 0.019 |
parse | 22 | 767 | 0.029 |
scoped_resource | 44 | 1,033 | 0.043 |
tuple_return_value | 16 | 192 | 0.084 |
files | 7 | 67 | 0.110 |
containers | 15 | 111 | 0.138 |
classes | 3 | 19 | 0.169 |
length | 41 | 199 | 0.207 |
cartesian | 83 | 324 | 0.255 |
escape | 101 | 353 | 0.286 |
cgi | 268 | 508 | 0.528 |
varargs | 16 | 20 | 0.779 |
control_flow | 214 | 102 | 2.088 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.3 | 10.8 | 0.40 |
cartesian | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.5 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
modules | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 7.1 | 0.52 |
length | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 6.9 | 0.53 |
fib_iter | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
tuple_return_value | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cgi | 0 | 8 | 0.000 |
classes | 0 | 12 | 0.000 |
containers | 0 | 24 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 4 | 12 | 0.334 |
fib_recursive | 4 | 8 | 0.448 |
length | 4 | 8 | 0.517 |
asdl_generated | 4 | 4 | 0.897 |
parse | 7 | 8 | 0.916 |
varargs | 51 | 52 | 0.974 |
cartesian | 8 | 8 | 0.983 |
tuple_return_value | 4 | 4 | 1.010 |
escape | 8 | 4 | 2.036 |