Skip to content
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

Use unsafeWithForeignPtr when available #325

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Apr 2, 2021

It turns out that all uses of withForeignPtr can safely use
unsafeWithForeignPtr.

I believe that this should resolve the regression noted in
GHC #19557
although I am still benchmarking

@Bodigrim
Copy link
Contributor

Bodigrim commented Apr 2, 2021

@bgamari could you please fix failed builds and rebase?

It turns out that all uses of withForeignPtr can safely use
unsafeWithForeignPtr.
Copy link
Contributor

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

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

This does not seem to fix a performance regression in GHC 9.0, but is useful nevertheless. Thanks!

@Boarders
Copy link

Boarders commented Apr 2, 2021

Thanks @bgamari!

@Bodigrim Bodigrim merged commit c98b879 into haskell:master Apr 11, 2021
@Bodigrim Bodigrim mentioned this pull request Jul 1, 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.

None yet

4 participants