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 | 892 | 0.008 |
modules | 2 | 167 | 0.011 |
fib_recursive | 11 | 885 | 0.012 |
loops | 4 | 283 | 0.014 |
asdl_generated | 11 | 378 | 0.029 |
parse | 30 | 796 | 0.038 |
scoped_resource | 42 | 1,045 | 0.041 |
files | 4 | 72 | 0.053 |
containers | 8 | 109 | 0.074 |
tuple_return_value | 20 | 222 | 0.091 |
varargs | 4 | 23 | 0.169 |
classes | 3 | 16 | 0.211 |
length | 45 | 196 | 0.228 |
cartesian | 86 | 331 | 0.260 |
escape | 102 | 341 | 0.299 |
cgi | 314 | 512 | 0.613 |
control_flow | 211 | 104 | 2.016 |
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 |
fib_iter | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
modules | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.8 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
files | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
fib_recursive | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
containers | 28.6 | 47.7 | 0.60 |
varargs | 5.6 | 6.9 | 0.81 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 4 | 0.000 |
classes | 0 | 16 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 8 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
length | 0 | 12 | 0.000 |
loops | 0 | 12 | 0.000 |
modules | 0 | 16 | 0.000 |
parse | 0 | 8 | 0.000 |
tuple_return_value | 0 | 4 | 0.000 |
containers | 8 | 28 | 0.284 |
cgi | 4 | 12 | 0.336 |
escape | 4 | 8 | 0.494 |
cartesian | 4 | 8 | 0.514 |
scoped_resource | 4 | 8 | 0.532 |
files | 4 | 4 | 0.951 |
varargs | 62 | 50 | 1.252 |