On Thu, Jan 23, 2014 at 3:15 PM, Peter Otten <__pete...@web.de> wrote:

> $ python -m timeit -s 'from debruijn_compat import debruijn as d' 'd(4, 8)'
> 10 loops, best of 3: 53.5 msec per loop
> $ python -m timeit -s 'from debruijn_compat import debruijn_bytes as d'
> 'd(4, 8)'
> 10 loops, best of 3: 22.2 msec per loop
> $ python3 -m timeit -s 'from debruijn_compat import debruijn as d' 'd(4,
> 8)'
> 10 loops, best of 3: 68 msec per loop
> $ python3 -m timeit -s 'from debruijn_compat import debruijn_bytes as d'
> 'd(4, 8)'
> 10 loops, best of 3: 21.7 msec per loop
>

Excellent Peter!
I have a question, the times reported don't make sense to me, for example
$ python3 -m timeit -s 'from debruijn_compat import debruijn_bytes as d'
'd(4, 8)'
100 loops, best of 3: 10.2 msec per loop
This took ~4 secs (stop watch) which is much more that 10*.0102 Why is this?

$ python3 -m timeit -s 'from debruijn_compat import debruijn_bytes as d'
'd(4, 11)'
10 loops, best of 3: 480 msec per loop​
This took ~20 secs vs .480*10

d(4, 14) takes about 24 seconds (one run)

Vincent Davis
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to