git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Anders Kaseorg <andersk@mit.edu>,
	git@vger.kernel.org, Thomas Rast <tr@thomasrast.ch>
Subject: Re: [PATCH] xdiff: Do not enable XDL_FAST_HASH by default
Date: Tue, 06 Dec 2016 13:23:11 -0800	[thread overview]
Message-ID: <xmqqh96gzr9c.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161201045243.mlr7wqvkbm2yd37m@sigill.intra.peff.net> (Jeff King's message of "Wed, 30 Nov 2016 23:52:43 -0500")

Jeff King <peff@peff.net> writes:

> This is a nice incremental step in the sense that people can still
> enable it if they want to in order to time it, play with it, etc. But
> given what we know, I wonder if the help text here should warn people.
>
> Or I guess we could move straight to dropping it entirely.
>
> Here's what that patch might look like (I retimed it just be sure, and
> was sad to see that it really _is_ making some cases faster. But I still
> think slower-but-predictable is a better default).

I like this version that drops quite a lot of code ;-)

> Subject: [PATCH] xdiff: drop XDL_FAST_HASH
> ...
> The idea of XDL_FAST_HASH is to speed up the hash
> computation. But the generated hashes have worse collision
> behavior. This means that in some cases it speeds diffs up
> (running "git log -p" on git.git improves by ~8% with it),
> but in others it can slow things down. One pathological case
> saw over a 100x slowdown[1].
>
> There may be a better hash function that covers both
> properties, but in the meantime we are better off with the
> original hash. It's slightly slower in the common case, but
> it has fewer surprising pathological cases.
>
> [1] http://public-inbox.org/git/20141222041944.GA441@peff.net/

  reply	other threads:[~2016-12-06 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  4:26 [PATCH] xdiff: Do not enable XDL_FAST_HASH by default Anders Kaseorg
2016-12-01  4:52 ` Jeff King
2016-12-06 21:23   ` Junio C Hamano [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-12-01  3:04 [PATCH] Define XDL_FAST_HASH when building *for* (not *on*) x86_64 Anders Kaseorg
2016-12-01  3:59 ` Jeff King
2016-12-01  4:30   ` [PATCH] xdiff: Do not enable XDL_FAST_HASH by default Anders Kaseorg

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqh96gzr9c.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=andersk@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=tr@thomasrast.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).