Uh oh!
There was an error while loading. Please reload this page.
Reintroduce case sensitive comparison optimization for FrozenDictionary in some cases - #95232
Conversation
ghost
commented
Nov 25, 2023
Tagging subscribers to this area: @dotnet/area-system-collections Issue DetailsIn #94667 we fixed a bug where This PR I am submitting re-introduces the optimization for scenarios like
I am not submitting any benchmarks up-front as it is a re-introduction of an optimization in some cases and there are no benchmarks for case insensitive Frozen Dictionaries. Please let me know if there's any relevant benchmarks I should run.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
andrewjsaid
commented
Jan 28, 2024
@stephentoub I have addressed your comments. Thanks |
danmoseley
commented
Jan 29, 2024
Is it worth adding benchmarks, you mention they don't exist? |
andrewjsaid
commented
Jan 29, 2024
@danmoseley I would recommend that at least a few benchmarks are added to dotnet/performance with case insensitive comparison, yes. I can try to find the time to do so but I can not reliably make that commitment at this moment. |
andrewjsaid
commented
Feb 15, 2024
Sorry to pester but as it's approved, could it also be merged, please? |
In #94667 we fixed a bug where
FrozenDictionary<string, T>was incorrectly using case sensitive comparison. The solution chosen minimized the diff as the PR would be ported to .NET 8. Upon reflection, alongside fixing the bug, it did de-optimize some cases where the optimization was in fact valid. The examples below give a quick summary.This PR I am submitting re-introduces the optimization for scenarios like
keys3above i.e. where:KeyAnalyzerhas found a substringI am not submitting any benchmarks up-front as it is a re-introduction of an optimization in some cases and there are no benchmarks for case insensitive Frozen Dictionaries. Please let me know if there's any relevant benchmarks I should run.