Skip to content
This repository was archived by the owner on Mar 9, 2020. It is now read-only.

Conversation

@Kizaemon
Copy link

@Kizaemon Kizaemon commented Mar 8, 2020

Removed redundant dictionary lookups and redundant key casing.
My benchmarks show measurable speed increase.

The underlying dictionary is already OrdinalIgnoreCase, so no need to apply key.ToLower(CultureInfo.InvariantCulture)
The calls should be to the more efficient TryGetValue, instead of two separate calls to ContainsKey and GetValue.

Removed redundant dictionary lookups and redundant key casing.
My benchmarks show measurable speed increase.

The underlying dictionary is already OrdinalIgnoreCase, so no need to apply key.ToLower(CultureInfo.InvariantCulture)
The calls should be to the more efficient TryGetValue, instead of two separate calls to ContainsKey and GetValue.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant