Skip to content

Conversation

@gamma-delta
Copy link

For value types, GetHashCode() provides a default hash code implementation that uses reflection. You should consider overriding it for better performance.

Source

In my experiments this makes generating a mesh for a 6x6x6x1 grid of unit hypercubes go from ~3 seconds to 0.006 seconds!

This makes having many shadows in a scene MUCH more performant.
@HackerPoet
Copy link
Owner

HackerPoet commented Aug 10, 2024

Thanks, I've just tested this and it indeed seems to have a major speedup in mesh generation. I had no idea that this wasn't the default behavior in C#. I'll add this in the next release.

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.

2 participants