Chopping substrings
http://blogs.perl.org/users/damian_conway/2019/07/chopping-substrings.html [blogs.perl.org]
2019-07-30 19:20
The “best practice” solution is a technique known as suffix trees, which requires some moderately complex coding. However, we can get very reasonable performance for strings up to hundreds of thousands of characters long using a much simpler approach.
source: HN