diff options
| author | bjorn <bjorn@bringert.net> | 2008-11-26 15:44:22 +0000 |
|---|---|---|
| committer | bjorn <bjorn@bringert.net> | 2008-11-26 15:44:22 +0000 |
| commit | 5dee98234e3df45d30f4aa6048bbd39c26d7af43 (patch) | |
| tree | f989834cb838cac440ecf9f3832e774e9468b6d1 /src/GF/Compile/Rename.hs | |
| parent | 260e13146e48992ce2c4fc323b78c94a31cf8dcf (diff) | |
My profiling showed that the BinTree operations were responsible for about 60% of the CPU time when reading a large .gfo file. Replacing BinTree by Data.Map reduced this to about 6%, which meant about 50% reduction in total CPU time.
Diffstat (limited to 'src/GF/Compile/Rename.hs')
| -rw-r--r-- | src/GF/Compile/Rename.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/GF/Compile/Rename.hs b/src/GF/Compile/Rename.hs index 7b4d09277..bfa342702 100644 --- a/src/GF/Compile/Rename.hs +++ b/src/GF/Compile/Rename.hs @@ -115,15 +115,14 @@ renameIdentPatt env p = do t' <- renameIdentTerm env t term2patt t' -info2status :: Maybe Ident -> (Ident,Info) -> (Ident,StatusInfo) -info2status mq (c,i) = (c, case i of +info2status :: Maybe Ident -> (Ident,Info) -> StatusInfo +info2status mq (c,i) = case i of AbsFun _ (Yes EData) -> maybe Con QC mq ResValue _ -> maybe Con QC mq ResParam _ -> maybe Con QC mq AnyInd True m -> maybe Con (const (QC m)) mq AnyInd False m -> maybe Cn (const (Q m)) mq _ -> maybe Cn Q mq - ) tree2status :: OpenSpec Ident -> BinTree Ident Info -> BinTree Ident StatusInfo tree2status o = case o of |
