3 ms·
I had some issues with long strings, like 5000 or greater. What length string were you using?
by KilledByAPixel 7y ago
I had some issues with long strings, like 5000 or greater. What length string were you using?
- wensley 7y ago22728 characters! Maybe that's way bigger than this is meant for.
- KilledByAPixel 7y agoYes, I'm interested in trying to make it work with longer strings. Worst case scenario if it gets long strings it could just split it up into strings of length that it can handle. The speed seems to decreases rapidly with string length at some point eventually hitting a brick wall, the sweet spot seems around 1000-5000.
- m712 7y agoThat means the algorithm's complexity is non-linear. I am suspecting the JScrush code currently but it could be somewhere else as well.
- KilledByAPixel 7y agoIt is the JSCrush code. I don't fully understand it, but it's a brute force approach to find the longest substrings.