Changes between Version 9 and Version 10 of Plugins/ReinitializeGlobals


Ignore:
Timestamp:
Jul 5, 2013 6:22:13 PM (2 years ago)
Author:
nfrisby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Plugins/ReinitializeGlobals

    v9 v10  
    171171
    172172Instead of allocating `FastString`s' uniques linearly, let's use a `UniqSupply`. Then we'd just need to split the supply in order to prevent the danger of two `FastString`s getting the same unique. Whatever routine does the splitting just needs to be called the first time libHSghc is loaded dynamically and never again.
     173
     174I whipped up a quick implementation (using `{-# SOURCE #-}` and minimal boot files for `Unique` and `UniqueSupply`). Testing on a library that takes ~8.9 seconds to build and allocates 6.334 gigs, I got a ~0.3% increase in allocation and a ~0.1 second increase in time. I should probably try measuring the affect on compilation times in nofib.