|
Re: loop performance bug: msg#00081lang.haskell.glasgow.bugs
Hi again, > > A first hint is to never try to guess what kind of code ghc generates. > > If you're in need of performance you need to look at some lower level > > code. I recommend the -fext-core flag to produce external core, a > > sort-of-readable output of ghc's internal representation of the > > program. One can learn a lot from that. > > Although when I do I don't necessarily understand what I see! I see > 'let' (ie allocating forms) where I would have hoped there would not be > but it doesn't help me to figure out why the code I've written ends up > producing allocations. > Reading core programs can indeed be confusing and difficult. It's an art that has to be mastered. All I can say is that in situations like this it can be rewarding. > > I'm very much surprised that this program was slower than the one > > without arrays. > > You mean the one without lists. > Yes :-) > > Since all lists are produced and consumed with "good" > > producers and consumers (as in section 7.10.3 in the User's Guide) > > they should really go away. This seems to be a real bug. > > This is what Simon M thought when I brought this up previously. He > suggested I use explicit recursion (which I thought I was doing with my > second version though it doesn't do much better!) > And I suggest Simon M tries to fix ghc so that you don't have to write the program using explicit recursion :-) > I was hoping that if the array reading was inlined that the calculation > of the index would also be inlined and so the Pos constructor need never > be allocated. > I think this is a fair assumption. But apparently ghc doesn't remove the overhead. Maybe ghc's optimizer needs to be beefed up. > BTW have you thought about picking up hIDE development again? I might go > back to it after Gtk2Hs hits version 1.0 > You're confusing me with Jonas Svensson. I don't blame you, it's an easy mistake to do if you're not a swede. So the answer is no, I'm not going to develop hIDE any further :-) I should mention though that there is a group of students here at Chalmers working on a Haskell IDE. I don't know the status of their project though. /Josef
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: loop performance bug, Donald Bruce Stewart |
|---|---|
| Next by Date: | Re: FW: ghc, linux, Yong Luo |
| Previous by Thread: | Re: loop performance bug, Duncan Coutts |
| Next by Thread: | Re: loop performance bug, Sean Seefried |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |