Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
modules | 1 | 128 | 0.008 |
fib_iter | 5 | 636 | 0.009 |
loops | 2 | 206 | 0.012 |
fib_recursive | 7 | 619 | 0.012 |
scoped_resource | 7 | 530 | 0.013 |
asdl_generated | 7 | 271 | 0.026 |
parse | 20 | 551 | 0.036 |
files | 5 | 51 | 0.090 |
containers | 7 | 70 | 0.098 |
tuple_return_value | 13 | 131 | 0.102 |
classes | 2 | 15 | 0.129 |
length | 25 | 141 | 0.179 |
cartesian | 61 | 241 | 0.254 |
escape | 75 | 251 | 0.298 |
cgi | 187 | 358 | 0.523 |
varargs | 18 | 19 | 0.960 |
control_flow | 146 | 77 | 1.898 |
Lower ratios are better. We use MB (powers of 10), not MiB (powers of 2).
example name | C++ | Python | C++ : Python |
classes | 4.6 | 11.0 | 0.42 |
parse | 3.9 | 7.7 | 0.50 |
cartesian | 3.7 | 7.2 | 0.51 |
scoped_resource | 3.8 | 7.3 | 0.52 |
escape | 3.7 | 7.0 | 0.53 |
modules | 3.8 | 7.2 | 0.53 |
cgi | 3.8 | 7.2 | 0.53 |
asdl_generated | 3.7 | 7.0 | 0.53 |
files | 3.9 | 7.2 | 0.53 |
loops | 4.0 | 7.4 | 0.54 |
length | 3.8 | 7.0 | 0.54 |
fib_recursive | 3.9 | 7.1 | 0.54 |
fib_iter | 3.8 | 7.0 | 0.54 |
tuple_return_value | 3.8 | 7.0 | 0.55 |
control_flow | 3.9 | 7.0 | 0.56 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
cgi | 0 | 4 | 0.000 |
classes | 0 | 4 | 0.000 |
control_flow | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
parse | 0 | 4 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 3 | 21 | 0.166 |
varargs | 9 | 11 | 0.800 |
length | 4 | 4 | 1.044 |
cartesian | 0 | 0 | NA |
escape | 0 | 0 | NA |
fib_iter | 0 | 0 | NA |
files | 0 | 0 | NA |
scoped_resource | 0 | 0 | NA |