in reply to Re: Speeding permutation counting
in thread Speeding permutation counting
"Substring" is closer to my original (too verbose) style, so some of the gains are also coming from the more succinct, easier to read code. Best so far is the "chop" based suggestion.Rate orig substring blokhead blokchop orig 1199/s -- -45% -62% -69% substring 2162/s 80% -- -31% -44% blokhead 3144/s 162% 45% -- -18% blokchop 3840/s 220% 78% 22% --
Still wondering if there might be other improvements, or some vastly different way to solve this.
Thanks for these suggestions, they really have helped.
-a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Speeding permutation counting
by ikegami (Patriarch) on Jul 18, 2007 at 15:44 UTC | |
by albert (Monk) on Jul 18, 2007 at 16:23 UTC | |
by ikegami (Patriarch) on Jul 18, 2007 at 17:37 UTC |