Re: pinned byte arrays

2006-10-19 Thread Duncan Coutts
Pinning the arrays gives the GC much less flexibility. Especially if your objects are small. It means that the GC can't move things to compact the heap and you'll end up with lots of holes in between heap objects of things that were collected but the space couldn't be re-used because other objects

Re: Re[2]: Benchmarking GHC

2006-10-19 Thread Duncan Coutts
On Thu, 2006-10-19 at 21:10 +0400, Bulat Ziganshin wrote: > btw, writing this message i thought that > -fconvert-strings-to-ByteStrings option will give a significant boost > to many programs without rewriting them :) This kind of data refinement has a side condition on the strictness of the func

Re[2]: Benchmarking GHC

2006-10-19 Thread Bulat Ziganshin
Hello Simon, Thursday, October 19, 2006, 6:40:54 PM, you wrote: > These days -O2, which invokes the SpecConstr pass, can have a big > effect, but only on some programs. it also enables -optc-O2. so, answering Neil's question: -O2 -funbox-strict-fields (sidenote to SPJ: -funbox-simple-strict-fi

recursive commentaries :)

2006-10-19 Thread Bulat Ziganshin
Hello glasgow-haskell-users, http://hackage.haskell.org/trac/ghc/wiki/Commentary contains a link 'The old GHC Commentary' which points to the http://www.cse.unsw.edu.au/~chak/haskell/ghc/comm/ page. guess what this page contains? :) it will be great to restore link to old commentaries -- Best r

RE: Benchmarking GHC

2006-10-19 Thread Simon Peyton-Jones
These days -O2, which invokes the SpecConstr pass, can have a big effect, but only on some programs. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] | On Behalf Of Neil Mitchell | Sent: 19 October 2006 11:22 | To: Donald Bruce Stewart | Cc: GHC Users Mailin

Re[2]: Benchmarking GHC

2006-10-19 Thread Bulat Ziganshin
Hello Ketil, Thursday, October 19, 2006, 11:05:48 AM, you wrote: > One thing that IME makes a difference is -funbox-strict-fields. It's > probably better to use pragmas for this, though. Another thing to > consider is garbage collection RTS flags, those can sometimes make a > big difference. y

Re: Benchmarking GHC

2006-10-19 Thread Bulat Ziganshin
Hello Neil, Wednesday, October 18, 2006, 10:49:37 PM, you wrote: > * At the moment, -O2 is unlikely to produce better code than -O. ghc manual full of text that was written 10 years or more ago :) > * When we want to go for broke, we tend to use -O2 -fvia-C >>From this I guess the answer is "-

Re: [Haskell] Expecting more inlining for bit shifting

2006-10-19 Thread John Meacham
On Wed, Oct 18, 2006 at 07:00:18AM -0400, [EMAIL PROTECTED] wrote: > I'm not sure this approach is best. In my case the ... needs to be the > entire body of the shift code. It would be ridiculous to have two copies > of the same code. What would be better is a hint pragma that says, > ``inlin

pinned byte arrays

2006-10-19 Thread Bulat Ziganshin
Hello glasgow-haskell-users, i have program that holds in memory a lot of strings (filenames) and use my own packed-string library to represent these string. this library uses newByteArray# to allocate strings. in my benchmark run (with 300.000 filenames in memory) program prints the following sta

Re: Benchmarking GHC

2006-10-19 Thread Neil Mitchell
Hi > One thing that IME makes a difference is -funbox-strict-fields. It's > probably better to use pragmas for this, though. Another thing to > consider is garbage collection RTS flags, those can sometimes make a > big difference. I _don't_ want to speed up a particular program by modifying

Re: Benchmarking GHC

2006-10-19 Thread Donald Bruce Stewart
ketil+haskell: > "Neil Mitchell" <[EMAIL PROTECTED]> writes: > > > I want to benchmark GHC vs some other Haskell compilers, what flags > > should I use? > > > [...] I guess the answer is "-O2 -fvia-C"? > > I tend to use -O2, but haven't really tested it against plain -O. > >From what I've seen -

Re: Benchmarking GHC

2006-10-19 Thread Ketil Malde
"Neil Mitchell" <[EMAIL PROTECTED]> writes: > I want to benchmark GHC vs some other Haskell compilers, what flags > should I use? > [...] I guess the answer is "-O2 -fvia-C"? I tend to use -O2, but haven't really tested it against plain -O. >From what I've seen -fvia-C is sometimes faster, somet