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 | 30 | 0.000 |
loops | 0 | 300 | 0.000 |
fib_iter | 8 | 890 | 0.008 |
asdl_generated | 4 | 376 | 0.009 |
modules | 2 | 185 | 0.010 |
fib_recursive | 11 | 898 | 0.012 |
parse | 22 | 775 | 0.029 |
scoped_resource | 39 | 1,007 | 0.039 |
containers | 12 | 110 | 0.107 |
tuple_return_value | 20 | 184 | 0.107 |
files | 8 | 68 | 0.112 |
length | 45 | 192 | 0.234 |
cartesian | 86 | 331 | 0.261 |
escape | 97 | 347 | 0.279 |
cgi | 255 | 506 | 0.504 |
varargs | 25 | 16 | 1.532 |
control_flow | 201 | 110 | 1.822 |
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.6 | 0.50 |
scoped_resource | 3.5 | 7.1 | 0.50 |
cartesian | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
fib_iter | 3.5 | 6.9 | 0.51 |
cgi | 3.7 | 7.1 | 0.52 |
control_flow | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
files | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.8 | 0.56 |
modules | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.8 | 0.60 |
varargs | 5.4 | 6.8 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cgi | 0 | 8 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 12 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
containers | 4 | 24 | 0.167 |
scoped_resource | 8 | 12 | 0.650 |
varargs | 41 | 57 | 0.729 |
asdl_generated | 7 | 8 | 0.892 |
parse | 7 | 8 | 0.929 |
cartesian | 4 | 4 | 0.984 |
escape | 8 | 8 | 1.010 |
control_flow | 8 | 4 | 2.001 |
classes | 3 | 0 | inf |
loops | 4 | 0 | inf |
fib_recursive | 0 | 0 | NA |
modules | 0 | 0 | NA |