Re: storing highly shared data structures

2006-01-09 Thread Simon Marlow

Christian Maeder wrote:

Simon Marlow wrote:


Right - Ptr isn't the right thing here, because GC will move objects
around.  That's why we have StablePtr and StableName. 



may it be that makeStableName is expensive? (or it is my additional Map?)

My old version is faster, because the version with makeStableName does 
very much GC.


Christian

1. with makeStableName (and a Map):

2,447,401,824 bytes allocated in the heap
703,294,688 bytes copied during GC
 50,780,688 bytes maximum residency (24 sample(s))

   9328 collections in generation 0 (129.88s)
 24 collections in generation 1 (  4.10s)

 99 Mb total memory in use

  INIT  time0.00s  (  0.00s elapsed)
  MUT   time   27.28s  ( 28.91s elapsed)
  GCtime  133.98s  (140.08s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time  161.26s  (168.99s elapsed)

  %GC time  83.1%  (82.9% elapsed)

  Alloc rate89,714,143 bytes per MUT second

  Productivity  16.9% of total user, 16.1% of total elapsed


Interesting... this could mean that updating the stable name table on 
each GC is very costly.  This deserves more investigation, but I'm 
afraid it's not high on the priority list for me.  I can help if anyone 
else wants to look into it.


Cheers,
Simon

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: problem with ghcprof on windows

2006-01-09 Thread Simon Marlow

Conal Elliott wrote:

When run ghcprof under Windows XP I get this message in uDraw: Error:
Cannot start application C:/TEMP/ghcprof30164.sh.  That file does
exist as a shell script:

bash-3.00$ ls -l C:/TEMP/ghcprof30164.sh
-rwxr-xr-x  1 Conal None 109 Jan  7 12:12 C:/TEMP/ghcprof30164.sh
bash-3.00$ cat C:/TEMP/ghcprof30164.sh
#!/bin/sh
/usr/local/cgprof C:/TEMP/ghcprof30164 0 i386-unknown-mingw32 
10.0 12.0 13.0 0.0 0 1 1 2 1900
bash-3.00$

Any idea what's going wrong and how to fix?


cgprof is likely to have bitrotted (if it ever worked).  Perhaps you can 
get by with basic time profiling (+RTS -p)?


Cheers,
Simon

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Failed to load interface for ...

2006-01-09 Thread Simon Marlow
Defaulting to --make would make sense, as would a complete re-design of 
the command-line syntax, but for the same reasons I don't think it's a 
good idea.  I don't want to break a lot of build systems for purely 
aesthetical reasons.


Cheers,
Simon

Seth Kurtzberg wrote:

How about changing it so --make is the default?  I always use it.  To me, that 
makes it logical as the default.  Of course there are reasons not to do this, 
such as not breaking peoples build scripts, and no doubt others I'm overlooking 
at the moment.  A flag to select the old behavior would take care of the build 
script problem, especially if it were also possible to use an environment 
variable (instead of, or perhaps available in addition to, a command line flag) 
to select the old behavior.  (It isn't old, obviously, but I'm sure everyone 
knows what I mean.)

Seth Kurtzberg


On Fri, 6 Jan 2006 13:54:26 +0300
Bulat Ziganshin [EMAIL PROTECTED] wrote:



Hello ,

how about adding suggestion to use --make to the following error
message? it would be very helpful for novices. i have run into this
problem several times before memoized that suggestion to use -v
actually means that i forgot to add --make :)


C:\!\Haskell\cpphs ghc -O2 Main.hs

Main.hs:17:0:
   Failed to load interface for `RunCpphs':
   Could not find module `RunCpphs': use -v to see a list of the files 
searched for
 


--
Best regards,
Bulat  mailto:[EMAIL PROTECTED]



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: darcs switchover

2006-01-09 Thread Malcolm Wallace
Sven Panne [EMAIL PROTECTED] writes:

  I've been looking at the cvs configuration file CVSROOT/modules.
  I /think/ the procedure is something like changing this:
 
nhc98src-d nhc98   nhc98
nhc98libraries  -d nhc98/src/libraries fptools/libraries
nhc98   -a nhc98src nhc98libraries
 
  to this:
 
nhc98src-d nhc98   nhc98
nhc98libraries  -o darcs get --reponame=nhc98/src/libraries \
 http://cvs.haskell.org/darcs/libraries
nhc98   -a nhc98src nhc98libraries
 
  and then a fresh cvs checkout of the nhc98 would be required in
  order to pick up the new location.
 
 As already mentioned on the cvs-all list this morning, this does not 
 work... :-(

No?  I've tested it (using nhc98cpphs rather than nhc98libraries),
and it seems to work for me.  What is the problem?  (Of course, I'm
not trying to do a two-way synchronisation, just grafting a darcs
repo into the cvs tree.)

Regards,
Malcolm
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re[2]: Failed to load interface for ...

2006-01-09 Thread Bulat Ziganshin
Hello Simon,

Monday, January 09, 2006, 1:45:45 PM, you wrote:

so i propose just to add words about --make to the error message

SM Defaulting to --make would make sense, as would a complete re-design of 
SM the command-line syntax, but for the same reasons I don't think it's a 
SM good idea.  I don't want to break a lot of build systems for purely 
SM aesthetical reasons.

SM Cheers,
SM Simon

SM Seth Kurtzberg wrote:
 How about changing it so --make is the default?  I always use it.  To me, 
 that makes it logical as the default.  Of course there are reasons not to do 
 this, such as not breaking peoples build
 scripts, and no doubt others I'm overlooking at the moment.  A flag to 
 select the old behavior would take care of the build script problem, 
 especially if it were also possible to use an
 environment variable (instead of, or perhaps available in addition to, a 
 command line flag) to select the old behavior.  (It isn't old, obviously, 
 but I'm sure everyone knows what I mean.)
 
 Seth Kurtzberg
 
 
 On Fri, 6 Jan 2006 13:54:26 +0300
 Bulat Ziganshin [EMAIL PROTECTED] wrote:
 
 
Hello ,

how about adding suggestion to use --make to the following error
message? it would be very helpful for novices. i have run into this
problem several times before memoized that suggestion to use -v
actually means that i forgot to add --make :)


C:\!\Haskell\cpphs ghc -O2 Main.hs

Main.hs:17:0:
Failed to load interface for `RunCpphs':
Could not find module `RunCpphs': use -v to see a list of the files 
 searched for
  

-- 
Best regards,
 Bulat  mailto:[EMAIL PROTECTED]



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


SM ___
SM Glasgow-haskell-users mailing list
SM Glasgow-haskell-users@haskell.org
SM http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re[2]: storing highly shared data structures

2006-01-09 Thread Bulat Ziganshin
Hello Christian,

Friday, January 06, 2006, 9:43:39 PM, you wrote:

CM My old version is faster, because the version with makeStableName does
CM very much GC.

CMMUT   time   27.28s  ( 28.91s elapsed)
CMGCtime  133.98s  (140.08s elapsed)

try to add infamous +RTS -A10m switch ;)

it's the third time i give this advice during last weeks :)  i added
it to the ghc wiki faq, opening up new section Optimization issues


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: storing highly shared data structures

2006-01-09 Thread Christian Maeder

Bulat Ziganshin wrote:

CM My old version is faster, because the version with makeStableName does
CM very much GC.

CMMUT   time   27.28s  ( 28.91s elapsed)
CMGCtime  133.98s  (140.08s elapsed)

try to add infamous +RTS -A10m switch ;)


You saved my day, thank you Bulat!

Without that flag:

  MUT   time   24.30s  ( 24.76s elapsed)
  GCtime  131.25s  (140.01s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time  155.55s  (164.77s elapsed)

And with it:

  MUT   time   23.86s  ( 24.86s elapsed)
  GCtime   11.03s  ( 11.68s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time   34.89s  ( 36.54s elapsed)

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: storing highly shared data structures

2006-01-09 Thread Christian Maeder

Bulat Ziganshin wrote:

try to add infamous +RTS -A10m switch ;)


Maybe -H300m is more famous?

  MUT   time   24.92s  ( 29.79s elapsed)
  GCtime6.32s  (  7.67s elapsed)
  EXIT  time0.00s  (  0.00s elapsed)
  Total time   31.24s  ( 37.46s elapsed)

Christian
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users