Measure the speedup from mycpp, and the resource usage.
Source code: oil/mycpp/examples
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 20 | 0.000 |
fib_iter | 4 | 889 | 0.004 |
modules | 2 | 174 | 0.012 |
fib_recursive | 11 | 893 | 0.012 |
loops | 4 | 291 | 0.013 |
asdl_generated | 7 | 378 | 0.019 |
parse | 23 | 752 | 0.030 |
scoped_resource | 47 | 1,045 | 0.045 |
files | 4 | 73 | 0.052 |
tuple_return_value | 10 | 179 | 0.056 |
containers | 12 | 104 | 0.117 |
length | 44 | 202 | 0.219 |
cartesian | 80 | 329 | 0.242 |
escape | 102 | 354 | 0.289 |
varargs | 8 | 24 | 0.351 |
cgi | 257 | 519 | 0.496 |
control_flow | 208 | 109 | 1.904 |
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.6 | 0.42 |
parse | 3.8 | 7.6 | 0.50 |
cgi | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
cartesian | 3.7 | 7.1 | 0.52 |
files | 3.7 | 7.1 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
control_flow | 0 | 8 | 0.000 |
length | 0 | 8 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 12 | 0.000 |
scoped_resource | 0 | 16 | 0.000 |
containers | 4 | 36 | 0.113 |
classes | 3 | 12 | 0.280 |
parse | 8 | 16 | 0.475 |
fib_iter | 4 | 8 | 0.480 |
tuple_return_value | 10 | 12 | 0.846 |
asdl_generated | 4 | 4 | 0.899 |
files | 4 | 4 | 0.944 |
escape | 4 | 4 | 1.016 |
varargs | 58 | 51 | 1.134 |
cartesian | 12 | 8 | 1.490 |
cgi | 12 | 4 | 2.975 |
fib_recursive | 0 | 0 | NA |