[darcs-users] darcs patch: switch Darcs.Patch.FileName to be ByteString.Char8 int...

Jason Dagit dagit at codersbase.com
Thu Sep 24 03:57:47 UTC 2009


I ran this more with normal builds and just the GC statistics.  Here is what
we see:
unmodified darcs:
469 MB total memory in use (3 MB lost due to fragmentation)
Total time   26.51s  ( 29.76s elapsed)
Productivity  85.6% of total user, 76.2% of total elapsed

469 MB total memory in use (3 MB lost due to fragmentation)
Total time   26.59s  ( 32.47s elapsed)
Productivity  85.6% of total user, 70.1% of total elapsed

469 MB total memory in use (3 MB lost due to fragmentation)
Total time   26.54s  ( 29.95s elapsed)
Productivity  85.5% of total user, 75.8% of total elapsed

With my patch applied:
554 MB total memory in use (4 MB lost due to fragmentation)
Total time   23.30s  ( 31.56s elapsed)
Productivity  83.1% of total user, 61.3% of total elapsed

554 MB total memory in use (4 MB lost due to fragmentation)
Total time   22.85s  ( 26.33s elapsed)
Productivity  82.9% of total user, 71.9% of total elapsed

554 MB total memory in use (4 MB lost due to fragmentation)
Total time   22.88s  ( 26.38s elapsed)
Productivity  82.8% of total user, 71.8% of total elapsed

Now that the profiler is disabled the productivity with my changes is less,
the run-time is maybe improved by 2-3 seconds, and the memory usage has
increased by almost 100 megs.  I can only assume that the profiling is
interfering with my results a fair bit.

Jason

On Wed, Sep 23, 2009 at 8:34 PM, Jason Dagit <dagit at codersbase.com> wrote:

>
>
> On Wed, Sep 23, 2009 at 7:50 PM, Jason Dagit <dagit at codersbase.com> wrote:
>
>>
>> PS I'll try to reply to this with data to quantify the
>> performance gains.
>>
>
> Here we go.
>
> I've compiled an unmodified profiling-enabled version of darcs in my path
> as darcs-prof-base.
>
> darcs-prof-base says during a test run:
> 500 MB total memory in use (4 MB lost due to fragmentation)
> 499 MB total memory in use (4 MB lost due to fragmentation)
>
> Productivity  33.6% of total user, 29.5% of total elapsed
> Productivity  30.4% of total user, 25.6% of total elapsed
>
> After my patch darcs says this:
> 516 MB total memory in use (4 MB lost due to fragmentation)
> 515 MB total memory in use (4 MB lost due to fragmentation)
>
> Productivity  52.4% of total user, 36.3% of total elapsed
> Productivity  52.4% of total user, 36.3% of total elapsed
>
> The in-ram memory usage has increased about 15 megs.  This is unfortunate,
> but from that we gain about 20% productivity.
>
> Attached are pdfs showing how the heap usage has changed.  Notice that the
> amount of heap consumed by lists goes way down and is replaced by an overall
> smaller usage of ByteString.  I think the profiling data really speaks to
> this as being quite an improvement over the existing code, assuming we can
> work out the details of the encode/decode with respect to UTF-8.
>
> Please let me know if you have questions!
>
> Thanks,
> Jason
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090923/f7e00142/attachment.htm>


More information about the darcs-users mailing list