Think it over again. You can do much faster by moving your window to the end of the previous section less the length of the substring to match plus one. That will make sure that any small substring split over the present window and the next, will now be completely in the next window.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial DeltronicsIn reply to Re^2: How to store large strings?
by CountZero
in thread How to store large strings?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |