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 | 895 | 0.009 |
modules | 2 | 198 | 0.009 |
fib_recursive | 11 | 887 | 0.012 |
loops | 4 | 291 | 0.013 |
asdl_generated | 7 | 397 | 0.018 |
parse | 22 | 780 | 0.029 |
scoped_resource | 43 | 1,047 | 0.041 |
files | 4 | 69 | 0.054 |
containers | 8 | 118 | 0.066 |
tuple_return_value | 20 | 186 | 0.109 |
classes | 3 | 15 | 0.208 |
length | 45 | 207 | 0.217 |
cartesian | 91 | 320 | 0.285 |
escape | 102 | 346 | 0.295 |
cgi | 250 | 520 | 0.481 |
varargs | 16 | 20 | 0.782 |
control_flow | 208 | 103 | 2.026 |
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 |
asdl_generated | 3.5 | 7.1 | 0.50 |
escape | 3.5 | 6.9 | 0.51 |
parse | 3.9 | 7.6 | 0.52 |
files | 3.7 | 7.1 | 0.52 |
tuple_return_value | 3.7 | 7.1 | 0.52 |
cartesian | 3.7 | 6.9 | 0.53 |
scoped_resource | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.8 | 0.54 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
length | 3.8 | 6.9 | 0.55 |
loops | 3.8 | 6.9 | 0.55 |
modules | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.8 | 0.56 |
containers | 28.4 | 47.8 | 0.59 |
varargs | 5.4 | 7.1 | 0.76 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
cartesian | 0 | 12 | 0.000 |
classes | 0 | 15 | 0.000 |
control_flow | 0 | 12 | 0.000 |
fib_iter | 0 | 4 | 0.000 |
fib_recursive | 0 | 4 | 0.000 |
length | 0 | 4 | 0.000 |
loops | 0 | 8 | 0.000 |
tuple_return_value | 0 | 8 | 0.000 |
containers | 8 | 20 | 0.396 |
asdl_generated | 4 | 8 | 0.454 |
files | 4 | 8 | 0.460 |
escape | 4 | 8 | 0.508 |
scoped_resource | 4 | 4 | 0.977 |
varargs | 51 | 52 | 0.978 |
cgi | 4 | 4 | 0.993 |
parse | 7 | 4 | 1.844 |
modules | 0 | 0 | NA |