in reply to Finding all substrings
The root of optimization is finding a solid algorithm, then implementing it, then speeding the implementation. You algorithm is solid (I don't know of a faster one . . .monks?) and your implementation is simple, meaning not much room for speed gain. Offhand though, C style for loops might be slightly faster (perl does an implicit ++ and check when you call the range operator, hence the rationale that doing it directly might be faster).
Cheers,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Finding all substrings
by samtregar (Abbot) on Apr 24, 2002 at 18:24 UTC |