Skip to content

Conversation

@sebastienros
Copy link
Member

No description provided.

{
var results = new World[count];

var ids = new int[count];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given how small this array is, could we stackalloc it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right here probably (I had tried on the update method at first), there is a MemoryExtensions method to do that on spans.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got confused by the diff but we can't do this in the updates scenario because we need to pass the ids array as a parameter.

https://github.com/aspnet/Benchmarks/pull/2132/files#diff-c1e1042637f371e2cbc5f6e975883c9c038a0b0de7d30c4e7c55b5bfa45c0f5aR225

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArrayPool then?

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.

3 participants