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 | 9 | 883 | 0.010 |
modules | 2 | 178 | 0.010 |
fib_recursive | 11 | 878 | 0.012 |
loops | 4 | 286 | 0.013 |
asdl_generated | 11 | 383 | 0.028 |
parse | 26 | 750 | 0.034 |
scoped_resource | 45 | 1,030 | 0.044 |
containers | 8 | 107 | 0.072 |
tuple_return_value | 20 | 193 | 0.104 |
files | 8 | 68 | 0.110 |
classes | 3 | 20 | 0.166 |
length | 44 | 198 | 0.225 |
cartesian | 89 | 329 | 0.269 |
escape | 103 | 352 | 0.293 |
cgi | 265 | 510 | 0.520 |
varargs | 27 | 20 | 1.378 |
control_flow | 212 | 107 | 1.980 |
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.8 | 0.41 |
scoped_resource | 3.5 | 7.2 | 0.49 |
parse | 3.8 | 7.6 | 0.50 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
escape | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
modules | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 7.1 | 0.56 |
fib_recursive | 3.9 | 7.1 | 0.56 |
containers | 28.3 | 47.7 | 0.59 |
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 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
parse | 4 | 16 | 0.229 |
containers | 8 | 28 | 0.277 |
scoped_resource | 4 | 12 | 0.340 |
varargs | 39 | 52 | 0.757 |
escape | 4 | 4 | 0.990 |
cartesian | 4 | 4 | 1.004 |
asdl_generated | 0 | 0 | NA |