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

Wrap pointer value in ManuallyDrop instead of Option #18

Closed
zslayton opened this Issue Nov 11, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@zslayton
Owner

zslayton commented Nov 11, 2018

We can eliminate the overhead of constantly having to check whether the contained value has been detach()ed by:

  • Wrapping it in ManuallyDrop instead of Option
  • Modifying detach() to completely deconstruct the value without relying on Drop being called later.

As seen in #11, this will grant a modest speed increase without hurting ergonomics.

zslayton pushed a commit that referenced this issue Nov 13, 2018

Zack Slayton
@zslayton

This comment has been minimized.

Owner

zslayton commented Nov 13, 2018

Fixed by c133e7e.

@zslayton zslayton closed this Nov 13, 2018

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