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 | 891 | 0.009 |
modules | 2 | 174 | 0.010 |
fib_recursive | 11 | 886 | 0.012 |
loops | 4 | 295 | 0.012 |
parse | 29 | 757 | 0.039 |
containers | 4 | 99 | 0.039 |
asdl_generated | 15 | 371 | 0.041 |
scoped_resource | 47 | 1,013 | 0.046 |
tuple_return_value | 16 | 191 | 0.084 |
files | 8 | 68 | 0.114 |
classes | 3 | 23 | 0.141 |
cartesian | 70 | 356 | 0.196 |
length | 40 | 199 | 0.200 |
escape | 104 | 355 | 0.293 |
cgi | 262 | 502 | 0.521 |
varargs | 12 | 20 | 0.577 |
control_flow | 204 | 110 | 1.860 |
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.9 | 0.41 |
length | 3.5 | 7.1 | 0.50 |
modules | 3.5 | 7.1 | 0.50 |
parse | 3.8 | 7.6 | 0.50 |
escape | 3.5 | 6.9 | 0.51 |
files | 3.7 | 7.1 | 0.52 |
scoped_resource | 3.7 | 7.1 | 0.52 |
loops | 3.8 | 7.2 | 0.53 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cartesian | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
fib_iter | 3.7 | 6.9 | 0.53 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
tuple_return_value | 3.9 | 6.9 | 0.57 |
containers | 28.7 | 47.7 | 0.60 |
varargs | 5.5 | 7.1 | 0.78 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
classes | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 8 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 8 | 0.000 |
parse | 0 | 12 | 0.000 |
scoped_resource | 0 | 4 | 0.000 |
containers | 12 | 36 | 0.324 |
escape | 4 | 8 | 0.496 |
length | 4 | 8 | 0.501 |
cgi | 4 | 8 | 0.501 |
control_flow | 4 | 8 | 0.510 |
varargs | 54 | 52 | 1.036 |
cartesian | 20 | 4 | 5.119 |
tuple_return_value | 4 | 0 | inf |