git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: git@vger.kernel.org, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Jay Soffian <jaysoffian@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Shawn Pearce <spearce@spearce.org>
Subject: Re: gc --aggressive
Date: Tue, 1 May 2012 15:35:37 -0400	[thread overview]
Message-ID: <20120501193537.GA26245@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.LFD.2.02.1205011348090.21030@xanadu.home>

On Tue, May 01, 2012 at 01:59:08PM -0400, Nicolas Pitre wrote:

> One final quick test if you feel like it: I've never been sure that 
> the last comparison in type_size_sort() is correct.  Maybe it should be 
> the other way around.  Currently it reads:
> 
> 	return a < b ? -1 : (a > b);

I think it is right. At least it should put recent things near the
front of the array, just as we are putting bigger things there.

> >   orig | 31.4M (100%) |   54s (100%)
> >     10 | 44.0M (140%) |  169s (310%)
> >     20 | 37.7M (120%) |  232s (428%)
> >     40 | 33.6M (107%) |  331s (608%)
> >     80 | 30.9M ( 99%) |  473s (868%)
> >    160 | 29.4M ( 94%) |  696s (1279%)
> [...]
> While keeping the size comparison commented out, you could try to 
> replace this line with:
> 
> 	return b < a ? -1 : (b > a);

No, it's not better. A few of the pack sizes are better, but some of
them are worse. And the CPU times are still quite bad. Here are the
numbers:

  orig | 31.4M (100%) |   54s (100%)
    10 | 45.6M (145%) |  158s (292%)
    20 | 39.2M (125%) |  205s (377%)
    40 | 35.1M (112%) |  275s (505%)
    80 | 32.4M (103%) |  388s (713%)
   160 | 30.6M ( 98%) |  581s (1067%)

-Peff

  parent reply	other threads:[~2012-05-01 19:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 16:16 gc --aggressive Jay Soffian
2012-04-17 17:53 ` Jay Soffian
2012-04-17 20:52   ` Matthieu Moy
2012-04-17 21:58     ` Jeff King
2012-04-28 12:25     ` Jeff King
2012-04-28 17:11       ` Nicolas Pitre
2012-04-29 11:34         ` Jeff King
2012-04-29 13:53           ` Nicolas Pitre
2012-05-01 16:28             ` Jeff King
2012-05-01 17:16               ` Jeff King
2012-05-01 17:59                 ` Nicolas Pitre
2012-05-01 18:47                   ` Junio C Hamano
2012-05-01 19:22                     ` Nicolas Pitre
2012-05-01 20:01                     ` Jeff King
2012-05-01 19:35                   ` Jeff King [this message]
2012-05-01 20:02                     ` Nicolas Pitre
2012-05-01 17:17               ` Nicolas Pitre
2012-05-01 17:22                 ` Jeff King
2012-05-01 17:47                   ` Nicolas Pitre
2012-04-28 16:56   ` Nicolas Pitre
2012-04-17 22:08 ` Jeff King
2012-04-17 22:17   ` Junio C Hamano
2012-04-17 22:18     ` Jeff King
2012-04-17 22:34       ` Junio C Hamano
2012-04-28 16:42         ` Nicolas Pitre
2012-04-18  8:49       ` Andreas Ericsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120501193537.GA26245@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=nico@fluxnic.net \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).