New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove allocations when enumerating sync hashes on an actor. #14443

Merged
merged 1 commit into from Dec 10, 2017

Conversation

Projects
None yet
3 participants
@RoosterDragon
Member

RoosterDragon commented Nov 27, 2017

Exposing Actor.SyncHashes as an array allows allocation free enumeration, we just need to adjust the SyncHash type to run the hash function.

if (syncHash.Hash != 0)
{
var hash = syncHash.Hash();
if (hash != 0)

This comment has been minimized.

@pchote

pchote Nov 27, 2017

Member

Style nit: please wrap this in braces to avoid the hanging multi-line braced block.

@pchote

pchote Nov 27, 2017

Member

Style nit: please wrap this in braces to avoid the hanging multi-line braced block.

This comment has been minimized.

@RoosterDragon

RoosterDragon Nov 29, 2017

Member

Added.

@RoosterDragon

RoosterDragon Nov 29, 2017

Member

Added.

Remove allocations when enumerating sync hashes on an actor.
Exposing Actor.SyncHashes as an array allows allocation free enumeration, we just need to adjust the SyncHash type to run the hash function.
@penev92

👍

@pchote pchote added this to the Next release milestone Dec 9, 2017

@pchote

pchote approved these changes Dec 10, 2017

@pchote pchote merged commit 8ef8c60 into OpenRA:bleed Dec 10, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RoosterDragon RoosterDragon deleted the RoosterDragon:alloc-sync-hash-enumeration branch Dec 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment