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 | 1,045 | 0.007 |
modules | 2 | 178 | 0.010 |
fib_recursive | 11 | 879 | 0.012 |
loops | 4 | 295 | 0.012 |
asdl_generated | 11 | 379 | 0.029 |
parse | 22 | 755 | 0.029 |
containers | 4 | 103 | 0.038 |
scoped_resource | 44 | 1,013 | 0.043 |
files | 4 | 75 | 0.051 |
tuple_return_value | 20 | 201 | 0.100 |
classes | 3 | 19 | 0.166 |
length | 41 | 203 | 0.200 |
cartesian | 85 | 322 | 0.263 |
escape | 98 | 348 | 0.282 |
cgi | 254 | 504 | 0.504 |
varargs | 12 | 16 | 0.740 |
control_flow | 208 | 109 | 1.907 |
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.7 | 0.40 |
parse | 3.8 | 7.6 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
escape | 3.5 | 6.9 | 0.51 |
cartesian | 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 |
length | 3.7 | 6.9 | 0.53 |
modules | 3.7 | 6.9 | 0.53 |
control_flow | 3.8 | 7.1 | 0.54 |
files | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
cgi | 0 | 8 | 0.000 |
classes | 0 | 11 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
scoped_resource | 4 | 12 | 0.330 |
containers | 12 | 32 | 0.366 |
cartesian | 4 | 8 | 0.501 |
length | 4 | 8 | 0.510 |
files | 4 | 4 | 0.918 |
parse | 7 | 8 | 0.923 |
varargs | 55 | 55 | 0.987 |
escape | 8 | 4 | 1.961 |
tuple_return_value | 0 | 0 | NA |