|
Re: GHC-6.4.1 much slower than GHC-6.4: msg#00076lang.haskell.glasgow.bugs
Hi, I've found a way to speed up your code for ghc-6.4.1. Replace the "where" with a "case" in PCP.Suc.suc_rules (see below) (Maybe that is a good idea in PCP.Rules.Suc, too) I don't know why this can be better optimized, but my profiling results are comparable to those of ghc-6.4 (without the change). Cheers Christian suc_rules sigma vp rs = case PCP.Rules.suc sigma rs of sucr -> \ conf -> do f <- sucr conf guard $ valid vp f return f total time = 251.22 secs (12561 ticks @ 20 ms) total alloc = 15,875,706,252 bytes (excludes profiling overheads) COST CENTRE MODULE %time %alloc transF NFA.Type 14.7 1.1 steps Util.Graph.BFS 6.2 2.2 trans_manyF NFA.Type 6.2 9.9 dfs_collect Util.Graph.DFS 5.0 4.0 step Util.Graph.BFS 4.2 0.6 build PCP.Rules.Excl.Type 2.9 3.6 isPartOf Util.Words 2.8 5.8 lang_ok PCP.Rules.Type 2.7 5.0 intersect NFA.Intersect 2.7 6.1 dfs_abort Util.Graph.DFS 2.5 2.4 transF NFA.DFA.Type 2.2 1.4 meet PCP.Search 2.1 0.6 det_tqf NFA.Det 1.8 3.3 genericCross Util.Cross 1.7 4.3 productive NFA.Intersect 1.6 3.5 det_dfa NFA.Det 1.5 1.1 build NFA.DFA.Hopcroft 1.5 3.1 subset NFA.Subset 1.4 2.2 apply PCP.Rules.Rule 1.4 2.6 map_fun Util.Map 1.3 1.2 complement NFA.Det 1.3 0.7 apply PCP.Rules.Type 1.1 1.5 suc PCP.Rules.Suc 1.0 1.0 ok PCP.Util.OK 1.0 0.6 select PCP.Rules.Type 1.0 1.4 is_final NFA.Type 0.7 1.0 sublistsN Util.Words 0.5 1.2 num_rules PCP.Rules.Type 0.4 1.0
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: GHC-6.4.1 much slower than GHC-6.4, Simon Marlow |
|---|---|
| Next by Date: | Re: GHC-6.4.1 much slower than GHC-6.4, Christian Maeder |
| Previous by Thread: | Re: GHC-6.4.1 much slower than GHC-6.4, Mirko Rahn |
| Next by Thread: | Re: GHC-6.4.1 much slower than GHC-6.4, Mirko Rahn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |