XenoAmess commented on pull request #565: URL: https://github.com/apache/commons-lang/pull/565#issuecomment-674527661
> I think the current huge list of input strings is more about testing functionality rather than performance. > > The method only cares about 3 characters: CR, LF or something else (unless it has a bug). > So the performance test needs to check those in various combinations. I think that is just 9 combinations. Not really. More cases are: 1. null string. 2. string of length 0 ("") 3. string of length 1 who ends with '\r' 4. string of length 1 who ends with '\n' 5. string of length 1 who ends with normal char While 3,4,5 be actually handled by a same `if`, I'd prefer hanle them seperately. So do 1 and 2. > It also needs to test the length, because that is used when doing the substring. > The method is likely to be used with textual input so it would make sense to try with a selection of lengths. > Not sure what the maximum should be, probably at least 1000, maybe considerably more. > It might make sense to do these as separate tests to see if the length affects the performance. So you mean we should add test for some specific length of strings? For example, "a"*1024, "a"*10240" and "a"*102400"? Fine, then I will add/rerun it if you need this data, at later today. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org