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/Parser/Charnames.hs

    r14214 r14337  
    55import Pugs.Internals 
    66import Data.ByteString.Char8 (unsafePackAddress) 
    7 import qualified Judy.StrMap as H 
    8 import qualified Judy.CollectionsM as C 
     7import qualified Data.HashTable as H 
     8import qualified UTF8 as Str 
    99 
    1010#ifdef PUGS_HAVE_PERL5 
     
    2828 
    2929nameToCode :: String -> Maybe Int 
    30 nameToCode name = inlinePerformIO (C.lookup (cast name) _NameToCode) 
     30nameToCode name = inlinePerformIO (H.lookup _NameToCode (cast name)) 
    3131 
    3232{-# NOINLINE _NameToCode #-} 
    33 _NameToCode :: H.StrMap ByteString Int 
    34 _NameToCode = unsafePerformIO $! C.fromList 
     33_NameToCode :: H.HashTable ByteString Int 
     34_NameToCode = unsafePerformIO $! hashList 
    3535    [ (unsafePackAddress 4 "NULL"#, 0x0000) 
    3636    , (unsafePackAddress 16 "START OF HEADING"#, 0x0001)