neoremind commented on PR #16323:
URL: https://github.com/apache/lucene/pull/16323#issuecomment-4861689260
Thanks for the PR! A bit thoughts purely on performance.
Searching code, the only caller passes wildcardChars = `{'*', '?'}`, just 2
chars. The current impl's inner loop is as tight as iterating two chars, which
I think JIT can unroll. The additional `BitSet(1 << 16)` allocates as large as
8KB array for each invocation with usually short query terms input in
realworld, and the array is super sparse, we may need to weight the cost of
such relatively large memory allocation vs. tight loop over small num of chars
working on top of short inputs with a micro benchmark. I guess the the BitSet
approach might not be as good as predicted.
Also if this method is not in critical call path, it would be better to
remove the TODO comment as the current impl is clean and simple.
--
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]