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 | 898 | 0.008 |
modules | 2 | 178 | 0.010 |
fib_recursive | 11 | 905 | 0.012 |
loops | 4 | 302 | 0.012 |
asdl_generated | 11 | 377 | 0.028 |
parse | 22 | 770 | 0.029 |
scoped_resource | 39 | 1,027 | 0.038 |
tuple_return_value | 18 | 195 | 0.093 |
containers | 12 | 115 | 0.101 |
files | 8 | 73 | 0.104 |
classes | 3 | 19 | 0.166 |
length | 40 | 199 | 0.201 |
cartesian | 91 | 346 | 0.262 |
escape | 110 | 351 | 0.313 |
cgi | 261 | 513 | 0.508 |
control_flow | 210 | 106 | 1.976 |
varargs | 25 | 12 | 2.070 |
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 |
cartesian | 3.5 | 6.9 | 0.51 |
asdl_generated | 3.7 | 7.1 | 0.52 |
cgi | 3.7 | 7.1 | 0.52 |
escape | 3.7 | 6.9 | 0.53 |
files | 3.7 | 6.9 | 0.53 |
length | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
loops | 3.8 | 7.1 | 0.54 |
fib_iter | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
control_flow | 3.9 | 6.9 | 0.57 |
fib_recursive | 3.9 | 6.9 | 0.57 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.4 | 6.9 | 0.77 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 8 | 0.000 |
cartesian | 0 | 8 | 0.000 |
classes | 0 | 12 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 8 | 0.000 |
files | 0 | 4 | 0.000 |
loops | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
containers | 4 | 20 | 0.195 |
length | 4 | 12 | 0.335 |
varargs | 41 | 60 | 0.690 |
tuple_return_value | 4 | 4 | 0.890 |
parse | 7 | 8 | 0.926 |
scoped_resource | 8 | 4 | 1.949 |
cgi | 8 | 4 | 2.002 |
escape | 12 | 4 | 2.947 |