git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] xdiff: Do not enable XDL_FAST_HASH by default

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 6, 2016, 21:23 UTC
Message-ID
<xmqqh96gzr9c.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161201045243.mlr7wqvkbm2yd37m@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> 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 ;-)
Show 15 quoted lines
> 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/
Previous: Jeff King
Message 3 of 3 in “xdiff: Do not enable XDL_FAST_HASH by default”
  1. xdiff: Do not enable XDL_FAST_HASH by defaultAnders Kaseorg, Dec 1, 2016
  2. Jeff KingDec 1, 2016
  3. Junio C HamanoDec 6, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.