ali-ghanbari edited a comment on pull request #233:
URL: https://github.com/apache/commons-text/pull/233#issuecomment-885893788


   > We'll need some JMH benchmarks to show what code performs best before 
picking a new method IMO... otherwise this is a no-go from my POV, it's just 
changing code...
   
   Agreed.
   Please note that this implementation improves **space complexity** (from 
quadratic to linear, which is a huge improvement!) and the general speed of the 
methods (asymptotically speaking) should remain more or less the same (as both 
have quadratic time complexity). I am not sure if JMH can measure memory 
footprint, but to test the memory usage, I suggest testing the new 
implementation with the first pair of large strings that make the previous 
implementation crash in one way or another.
   I happened to learn about this more efficient algorithm in a research 
project where I was getting OutOfMemoryError with the current implementation of 
`apply` method and I used this new implementation and it worked without any 
problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to