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 | 18 | 0.000 |
loops | 0 | 298 | 0.000 |
fib_iter | 8 | 897 | 0.009 |
modules | 2 | 178 | 0.010 |
fib_recursive | 11 | 870 | 0.013 |
parse | 23 | 777 | 0.029 |
containers | 4 | 121 | 0.033 |
asdl_generated | 12 | 368 | 0.033 |
scoped_resource | 45 | 1,090 | 0.041 |
tuple_return_value | 14 | 183 | 0.078 |
files | 9 | 61 | 0.145 |
length | 46 | 206 | 0.222 |
cartesian | 77 | 327 | 0.235 |
escape | 104 | 344 | 0.302 |
cgi | 270 | 507 | 0.533 |
varargs | 28 | 24 | 1.169 |
control_flow | 212 | 114 | 1.851 |
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.5 | 0.42 |
parse | 3.9 | 7.7 | 0.51 |
cartesian | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
files | 3.7 | 7.1 | 0.52 |
asdl_generated | 3.7 | 6.9 | 0.53 |
cgi | 3.7 | 6.9 | 0.53 |
control_flow | 3.7 | 6.9 | 0.53 |
fib_recursive | 3.7 | 6.9 | 0.53 |
modules | 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 |
length | 3.8 | 6.9 | 0.55 |
scoped_resource | 3.8 | 6.9 | 0.55 |
containers | 28.5 | 47.8 | 0.60 |
varargs | 5.6 | 7.1 | 0.80 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
cgi | 0 | 8 | 0.000 |
fib_recursive | 0 | 12 | 0.000 |
files | 0 | 15 | 0.000 |
length | 0 | 4 | 0.000 |
modules | 0 | 4 | 0.000 |
classes | 4 | 13 | 0.270 |
scoped_resource | 4 | 8 | 0.469 |
escape | 4 | 8 | 0.500 |
containers | 12 | 20 | 0.590 |
tuple_return_value | 7 | 12 | 0.595 |
varargs | 40 | 48 | 0.835 |
loops | 4 | 4 | 1.115 |
parse | 8 | 4 | 1.893 |
cartesian | 16 | 8 | 2.031 |
control_flow | 0 | 0 | NA |
fib_iter | 0 | 0 | NA |