[Haskell-cafe] Is it safe to create global variables using unsafePerformIO?

Brandon Allbery allbery.b at gmail.com
Wed Jan 29 18:17:30 UTC 2014

On Wed, Jan 29, 2014 at 1:09 PM, Ömer Sinan Ağacan <omeragacan at gmail.com>wrote:

> > It isn't clear that
> > this will give an improvement in performance
> Why is that? I think it's clear since I'm eliminating malloc calls.
> (though one may claim that malloc calls are so cheap it's not even
> measurable)

(1) it's not really malloc since it's being garbage collected when out of

(2) given that there is a lot of allocation anyway and anything allocated
as ephemerally as this use case is very common and very highly optimized,
it's not really worth it

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140129/ae2018a8/attachment.html>

More information about the Haskell-Cafe mailing list