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 | 7 | 889 | 0.008 |
modules | 2 | 182 | 0.009 |
loops | 4 | 300 | 0.012 |
fib_recursive | 11 | 864 | 0.012 |
asdl_generated | 11 | 378 | 0.028 |
containers | 4 | 122 | 0.031 |
parse | 26 | 770 | 0.033 |
scoped_resource | 48 | 1,023 | 0.047 |
tuple_return_value | 20 | 198 | 0.101 |
files | 7 | 72 | 0.103 |
length | 45 | 212 | 0.210 |
cartesian | 82 | 332 | 0.247 |
escape | 107 | 345 | 0.309 |
cgi | 262 | 513 | 0.510 |
varargs | 12 | 20 | 0.616 |
control_flow | 206 | 104 | 1.979 |
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.42 |
parse | 3.8 | 7.6 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
escape | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.7 | 48.0 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
control_flow | 0 | 8 | 0.000 |
escape | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 16 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
scoped_resource | 0 | 12 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
classes | 3 | 8 | 0.419 |
containers | 11 | 12 | 0.969 |
cgi | 4 | 4 | 0.989 |
varargs | 53 | 52 | 1.027 |
cartesian | 8 | 4 | 1.949 |
parse | 4 | 0 | inf |
length | 0 | 0 | NA |