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 | 881 | 0.009 |
asdl_generated | 4 | 368 | 0.010 |
modules | 2 | 188 | 0.010 |
fib_recursive | 11 | 895 | 0.012 |
loops | 4 | 293 | 0.013 |
parse | 26 | 762 | 0.034 |
scoped_resource | 44 | 1,021 | 0.043 |
containers | 8 | 110 | 0.072 |
tuple_return_value | 16 | 193 | 0.084 |
files | 8 | 64 | 0.118 |
classes | 3 | 22 | 0.151 |
length | 45 | 214 | 0.212 |
cartesian | 87 | 326 | 0.266 |
escape | 98 | 347 | 0.283 |
cgi | 262 | 511 | 0.512 |
varargs | 15 | 20 | 0.770 |
control_flow | 206 | 112 | 1.829 |
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.7 | 7.6 | 0.48 |
asdl_generated | 3.5 | 7.1 | 0.50 |
cartesian | 3.5 | 7.1 | 0.50 |
length | 3.5 | 7.1 | 0.50 |
scoped_resource | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
escape | 3.7 | 6.8 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
containers | 28.7 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
classes | 0 | 9 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
files | 0 | 12 | 0.000 |
length | 0 | 12 | 0.000 |
containers | 8 | 25 | 0.325 |
scoped_resource | 4 | 12 | 0.331 |
parse | 4 | 8 | 0.455 |
cartesian | 4 | 8 | 0.489 |
cgi | 4 | 8 | 0.497 |
asdl_generated | 7 | 8 | 0.894 |
varargs | 50 | 52 | 0.963 |
escape | 8 | 8 | 1.028 |
control_flow | 4 | 0 | inf |
tuple_return_value | 4 | 0 | inf |
loops | 0 | 0 | NA |
modules | 0 | 0 | NA |