Skip to content

Conversation

@onyxmaster
Copy link

Hello!

There are small performance improvements worth about 13% speedup for .NET 8+9 on the AddElementHash timing in order of effect:

  • elide extra bounds check for lookupDense using ref var
  • tune branching using explicit maximum comparison and mutation checks, especially for repeated additions
  • remove the need for devirtualization by replacing private field type of IDictionary<,> with Dictionary<,> (doesn't actually modify tier1 JIT code, but make JIT's job easier opening potential future optimization)

…, remove the need for IDictionary devirtualization, reduce branching graph depth), this adds about 13% on .NET 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant