paulirwin commented on PR #1068: URL: https://github.com/apache/lucenenet/pull/1068#issuecomment-2551782910
> Wouldn't this be categorized as a performance improvement rather than a bugfix? I'm not sure there would be any performance impact. Originally I had assumed that we needed to do this to avoid overflow exceptions, but I realized just now that our projects do not have the "Check for arithmetic overflow" compiler option checked, so that reasoning is not valid alone. Perhaps an argument could be made that it helps ensure best practices and might help users if they want to recompile the library with that option for some reason, as well as to be consistent with other places in the codebase where we were already using `unchecked` blocks in GetHashCode... but in terms of performance, it looks like it generates the same opcodes without these blocks (i.e. `add` vs `add.ovf`), so there's no perf benefit here either. I'm not opposed to still moving forward with this PR for consistency's sake, but it's not the bugfix I thought it was. Perhaps "notes:ignore" would be a better label then. -- 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: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org