squid icon indicating copy to clipboard operation
squid copied to clipboard

Bug 5185: IPcache lookup of domain names is case-sensitive

Open sachin1gupta1980 opened this issue 11 months ago • 4 comments

This change provide a case-insensitive version of hash4() while avoiding hash4() code duplication. This solution has significantly better performance than calling tolower() before applying hash4() because applying tolower() requires copying the constant c-string.

It is likely that better (case-insensitive) hash functions exist and should be used instead, but we have decided to reuse hash4() logic to reduce the number of affected use cases and reduce the work required to validate the new hash function.

TODO:

  • [ ] Verify that hash4() results have not changed.
  • [ ] Verify that hash4() assembly code has not change much (on optimized builds).
  • [ ] Verify that hash4() performance has not change much (on optimized builds).
  • [ ] Verify that casehash4() results are identical to hash4() results for lowercase strings.
  • [ ] Verify that casehash4() performance is "significantly better" than #1398 solution.
  • [ ] Compare casehash4() performance with that of hash4() for lowercase strings.
  • [ ] Update this PR description to reflect performance comparison findings from the previous to-do item.
  • [ ] Update this PR description to remove this TODO list.

sachin1gupta1980 avatar Jul 10 '23 05:07 sachin1gupta1980