jbellis commented on PR #12281: URL: https://github.com/apache/lucene/pull/12281#issuecomment-1585706514
I'm pretty sure that a single check for isFinite is going to be negligible compared to the cost of doing the computation -- checking the vectors only happens if that single check fails. We "know" that they must be finite b/c of index-time check but since we only do the full check if we lost so much precision during the computation that we get NaN/Infinity back, it seems reasonable to me. I'll put together a benchmark to see how much the double math slows things down. Is there a threshold at which we're okay paying a small performance cost for improved precision? -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org