[darcs-users] profiling darcs (issue973)

Eric Kow eric.kow at gmail.com
Fri Aug 1 13:16:03 UTC 2008


As Zooko points out, the first step towards darcs 2.1 (performance enhanced) is
profiling.

Here is my attempt at doing some profiling for http://bugs.darcs.net/issue973

Results attached.  Could I get a volunteer to repeat this for
Windows or MacOS X?  [they don't seem too different on Linux] If you
have trouble compiling darcs, you may need my latest patch, which is
also attached.

Otherwise, does anybody see anything enticing?  If you are a
Haskeller, here's a great chance to help the darcs project out:
study the profile, hack some code, submit improvements.

No patch theory needed!

Methodology
-----------
0) compile darcs with profiling support
     * for GHC 6.8.3, modify GNUmakefile adding -fregs-graph to the GHCFLAGS
          GHCFLAGS += -Wall -Werror -I. -I./src -i./src -fregs-graph
     * invoke:
        ./configure --enable-profile)
        make
        cp darcs /usr/local/pdarcs

(1) obtain a clean checkout of GHC
      darcs get ghc pghc-old
      darcs get --hashed ghc pghc-hashed
      darcs convert ghc pghc-darcs2

(2) for each ghc, invoke:
         for i in `find compiler -name '*hs'`;\
         do sed -e 's/id/ego/' $i > $i.2 ;\
            mv -f $i.2 $i;\
         done
         pdarcs whatsnew +RTS -prof
         tmpgdir=`pwd`
         mv pdarcs.prof pdarcs-`basename $tmpgdir`.prof

(3) examine the results

If somebody can cook up a little profiling framework for darcs, it would be
great.

Old summary
-----------
total time  =        7.60 secs   (380 ticks @ 20 ms)
total alloc = 1,563,749,084 bytes  (excludes profiling overheads)

Hashed summary
--------------
total time  =        8.08 secs   (404 ticks @ 20 ms)
total alloc = 1,601,899,712 bytes  (excludes profiling overheads)

Darcs 2 summary
---------------
total time  =        7.88 secs   (394 ticks @ 20 ms)
total alloc = 1,601,439,880 bytes  (excludes profiling overheads)

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdarcs-pghc-old.prof
Type: application/octet-stream
Size: 115613 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080801/76986f76/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pghc-hashed.prof
Type: application/octet-stream
Size: 133804 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080801/76986f76/attachment-0005.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pghc-dacrs2.prof
Type: application/octet-stream
Size: 132974 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080801/76986f76/attachment-0006.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure_-check-for-packages-needed-with-split-base_.dpatch
Type: application/octet-stream
Size: 12039 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080801/76986f76/attachment-0007.obj 


More information about the darcs-users mailing list