psalagnac commented on PR #4653:
URL: https://github.com/apache/solr/pull/4653#issuecomment-7172729473
Thanks for pointing the possible infinite loop issue @dsmiley. I addressed
it and added test coverage for it.
About the `byte[]` allocation, I ran AI based benchmarks and it's actually
slightly faster to allocate it (GC included) than using the UTF encoder for
small strings.
> Also noting String.getBytes(UTF_8)'s default replacement for an unpaired
surrogate is a single 0x3F ('?'), vs. the old code's 3-byte U+FFFD (EF BF BD)
The performance improvement mostly comes from using `String.getByte()`. I
think it is faster than any other mechanism for small string.
I agree there is a small functional change here, but how important is this?
I don't expect any Solr user to match records with using invalid chars.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]