arne at leithe.spammenot.no
Tue Jul 17 20:08:39 CEST 2001
"Terry Reedy" <tjreedy at home.com> wrote in
news:0oR47.12485$p7.4220508 at news1.rdc2.pa.home.com:
> So why do you object when I revise an algorith to make it feasible for
> much larger n?
Because you optimized a brute force-algorithm for speed, without first
fixing the algorithm (first and foremost the ability to vary "k"). It
seemed that the ability to use large n-s, however, somehow was of paramount
importance, and you even suggested that Donovan use a rather obscure
technique to vary k.
Your latest algorithm is great, though, and I wish you had posted it the
first time around. I find it to imortant when explaining algorithms to
beginners that extensibility and generality of the algorithm should be
taken care of before speed. When I find myself in a position where I need
to unroll loops (or even get rid of recursion), I'm already reprogramming
the algorithm in C++.
More information about the Python-list