Skip to content

Conversation

@Dancpaz
Copy link

@Dancpaz Dancpaz commented Dec 19, 2021

Optimized PairingHeap.Extract to the following effect:

  • Code shortened
  • Execution time reduced
  • Memory allocation eliminated

Benchmarked these changes with BenchmarkDotNet in .NET 6 in a different project:
Original Method: 261.6 us
Updated Method: 184.1 us

The benchmark consisted of inserting 1,000 random numbers, then extracting them all.

All tests pass.

@Dancpaz Dancpaz closed this Dec 19, 2021
@Dancpaz
Copy link
Author

Dancpaz commented Dec 19, 2021

Canceled due to a potential bug. Will fix and resubmit later.

@Dancpaz
Copy link
Author

Dancpaz commented Dec 19, 2021

Confirmed that the potential bug I was worried about did not actually exist. Reopening.

@Dancpaz Dancpaz reopened this Dec 19, 2021
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