Changeset 14337 for src/Pugs/Prim.hs

Show
Ignore:
Timestamp:
10/17/06 08:25:35 (2 years ago)
Author:
audreyt
svk:copy_cache_prev:
21206
Message:

* Remove Judy from the Pugs build process.

This is a pervasive change to avoid GC issues completely
before the release, as the nature of addForeignPtrFinalizer's
weird interaction with GHC is not fully diagnosed.

Also, TVar/IORef based storage, which was exceedingly slow
in GHC 6.4, now actually compares competitively with Judy maps.
Judy is still more memory efficient and may be faster on some
architectures, but its re-incoporation will have to wait until
after release and a fuller understanding of its use of FFI/GC.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r14321 r14337  
    4040import Control.Exception (ioErrors) 
    4141 
    42 import qualified Judy.CollectionsM as C 
    43 --import qualified Judy.StrMap         as H 
    44  
    4542import Pugs.Prim.Keyed 
    4643import Pugs.Prim.Yaml 
     
    5855import GHC.Unicode 
    5956import qualified UTF8 as Str 
     57import qualified Data.HashTable as H 
    6058 
    6159constMacro :: Exp -> [Val] -> Eval Val 
     
    12811279    defs    <- fromVal =<< fetch "attrs" 
    12821280 
    1283     attrs   <- liftIO $ (C.new :: IO IHash) 
     1281    attrs   <- liftIO $ H.new (==) H.hashString 
    12841282    writeIVar (IHash attrs) (named `Map.union` defs) 
    12851283    uniq    <- newObjectId 
     
    13001298    (VObject o) <- fromVal t 
    13011299    attrs   <- readIVar (IHash $ objAttrs o) 
    1302     attrs'   <- liftIO $ (C.new :: IO IHash) 
     1300    attrs'  <- liftIO $ H.new (==) H.hashString 
    13031301    uniq    <- newObjectId 
    13041302    writeIVar (IHash attrs') (named `Map.union` attrs)