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/RemoveLiT.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/RemoveLiT.hs')
| -rw-r--r-- | src/GF/Compile/RemoveLiT.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GF/Compile/RemoveLiT.hs b/src/GF/Compile/RemoveLiT.hs index d06b80400..a641737eb 100644 --- a/src/GF/Compile/RemoveLiT.hs +++ b/src/GF/Compile/RemoveLiT.hs @@ -40,12 +40,12 @@ remlModule gr mi@(name,mod) = case mod of return $ (name,mod2) _ -> return mi -remlResInfo :: SourceGrammar -> (Ident,Info) -> Err (Ident,Info) -remlResInfo gr mi@(i,info) = case info of - ResOper pty ptr -> liftM ((,) i) $ liftM2 ResOper (ren pty) (ren ptr) - CncCat pty ptr ppr -> liftM ((,) i) $ liftM3 CncCat (ren pty) (ren ptr) (ren ppr) - CncFun mt ptr ppr -> liftM ((,) i) $ liftM2 (CncFun mt) (ren ptr) (ren ppr) - _ -> return mi +remlResInfo :: SourceGrammar -> (Ident,Info) -> Err Info +remlResInfo gr (i,info) = case info of + ResOper pty ptr -> liftM2 ResOper (ren pty) (ren ptr) + CncCat pty ptr ppr -> liftM3 CncCat (ren pty) (ren ptr) (ren ppr) + CncFun mt ptr ppr -> liftM2 (CncFun mt) (ren ptr) (ren ppr) + _ -> return info where ren = remlPerh gr |
