Skip to content

Use unsafeWithForeignPtr when available - #325

Merged
Bodigrim merged 1 commit into
haskell:masterfrom
bgamari:wip/unsafeWithForeignPtr
Apr 11, 2021
Merged

Use unsafeWithForeignPtr when available#325
Bodigrim merged 1 commit into
haskell:masterfrom
bgamari:wip/unsafeWithForeignPtr

Conversation

@bgamari

@bgamari bgamari commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

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

Bodigrim commented Apr 2, 2021

Copy link
Copy Markdown
Contributor

@bgamari could you please fix failed builds and rebase?

It turns out that all uses of withForeignPtr can safely use
unsafeWithForeignPtr.
@bgamari
bgamari force-pushed the wip/unsafeWithForeignPtr branch from 07f7fcb to b7149b4 Compare April 2, 2021 19:33

@Bodigrim Bodigrim left a comment

Copy link
Copy Markdown
Contributor

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

Boarders commented Apr 2, 2021

Copy link
Copy Markdown

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.

4 participants