Added raw pointer read/write operations #9

merged 1 commit into from Apr 5, 2012


None yet
2 participants

yav commented Apr 5, 2012


I work at Galois Inc., and we've been using your binding to the open-ssl library. Thanks for your work! We noticed that the bytestring API for the 'read' and 'write' operations is a bit slow as it puts a lot of pressure on the garbage collector: receiving data requires allocation of temporary byte-string buffers, which are then parsed into actual Haskell values for further use.

I added a couple of functions to allow sending and receiving data directly to a memory buffer. This is useful because it makes it possible to reuse the same buffer for multiple operations, which leads to a significant gain in performance. The functions are analogous to 'hPutVuf' and 'hGetBufSome' from the 'System.IO' module.

Could you please merge the change and upload a new version to Hackage?

Thanks for your work,

depressed-pho added a commit that referenced this pull request Apr 5, 2012

Merge pull request #9 from yav/master
Added raw pointer read/write operations

@depressed-pho depressed-pho merged commit 7e6efe8 into depressed-pho:master Apr 5, 2012


depressed-pho commented Apr 5, 2012

Great. Thank you very much for your contribution. I'll soon upload a new version to Hackage.


depressed-pho commented Apr 5, 2012
I'm proud of my package for being used by Galois ;)

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