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 | 23 | 0.000 |
fib_iter | 8 | 886 | 0.008 |
modules | 2 | 182 | 0.010 |
fib_recursive | 11 | 875 | 0.012 |
loops | 4 | 289 | 0.013 |
asdl_generated | 7 | 370 | 0.020 |
parse | 26 | 778 | 0.033 |
containers | 4 | 104 | 0.037 |
scoped_resource | 43 | 1,048 | 0.041 |
files | 4 | 73 | 0.053 |
tuple_return_value | 20 | 189 | 0.107 |
length | 44 | 207 | 0.213 |
cartesian | 87 | 334 | 0.259 |
escape | 99 | 342 | 0.290 |
cgi | 265 | 521 | 0.509 |
varargs | 23 | 19 | 1.238 |
control_flow | 208 | 114 | 1.819 |
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.41 |
parse | 3.8 | 7.7 | 0.49 |
length | 3.5 | 6.9 | 0.51 |
cartesian | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.8 | 0.56 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.4 | 7.1 | 0.76 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 12 | 28 | 0.410 |
classes | 3 | 8 | 0.427 |
asdl_generated | 4 | 8 | 0.449 |
parse | 4 | 8 | 0.462 |
scoped_resource | 4 | 8 | 0.487 |
cartesian | 4 | 8 | 0.489 |
varargs | 43 | 53 | 0.811 |
escape | 8 | 8 | 0.999 |
files | 4 | 4 | 1.002 |
cgi | 0 | 0 | NA |
control_flow | 0 | 0 | NA |
length | 0 | 0 | NA |