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_recursive | 7 | 884 | 0.008 |
fib_iter | 8 | 889 | 0.009 |
modules | 2 | 182 | 0.010 |
loops | 4 | 299 | 0.012 |
asdl_generated | 11 | 371 | 0.029 |
parse | 29 | 755 | 0.039 |
scoped_resource | 47 | 1,029 | 0.045 |
containers | 8 | 126 | 0.063 |
tuple_return_value | 20 | 192 | 0.105 |
files | 8 | 68 | 0.115 |
classes | 3 | 16 | 0.203 |
length | 45 | 203 | 0.222 |
cartesian | 86 | 353 | 0.244 |
escape | 103 | 351 | 0.294 |
cgi | 266 | 540 | 0.493 |
varargs | 19 | 35 | 0.555 |
control_flow | 205 | 108 | 1.911 |
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 |
asdl_generated | 3.5 | 6.9 | 0.51 |
cgi | 3.5 | 6.9 | 0.51 |
escape | 3.5 | 6.9 | 0.51 |
modules | 3.7 | 6.9 | 0.53 |
tuple_return_value | 3.7 | 6.9 | 0.53 |
length | 3.8 | 7.1 | 0.54 |
loops | 3.8 | 7.1 | 0.54 |
scoped_resource | 3.8 | 7.1 | 0.54 |
cartesian | 3.8 | 6.9 | 0.55 |
control_flow | 3.8 | 6.9 | 0.55 |
fib_iter | 3.8 | 6.9 | 0.55 |
fib_recursive | 3.8 | 6.9 | 0.55 |
files | 3.8 | 6.8 | 0.56 |
containers | 28.7 | 47.8 | 0.60 |
varargs | 5.5 | 6.9 | 0.79 |
Lower ratios are better.
example name | C++ | Python | C++ : Python |
asdl_generated | 0 | 12 | 0.000 |
classes | 0 | 16 | 0.000 |
control_flow | 0 | 8 | 0.000 |
fib_iter | 0 | 12 | 0.000 |
files | 0 | 8 | 0.000 |
length | 0 | 8 | 0.000 |
loops | 0 | 8 | 0.000 |
modules | 0 | 4 | 0.000 |
parse | 0 | 12 | 0.000 |
scoped_resource | 0 | 4 | 0.000 |
cartesian | 4 | 8 | 0.488 |
containers | 8 | 12 | 0.649 |
fib_recursive | 4 | 4 | 0.909 |
varargs | 47 | 39 | 1.200 |
escape | 8 | 4 | 1.968 |
cgi | 0 | 0 | NA |
tuple_return_value | 0 | 0 | NA |