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

Re: Make GIT_USE_LOOKUP default?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 18, 2013, 17:08 UTC
Message-ID
<7vli9kocuc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130318164950.GA14844@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 25 quoted lines
> On Mon, Mar 18, 2013 at 09:44:20AM -0700, Junio C Hamano wrote:
>
>> FWIW, I am getting something like this on my
>> 
>> $ grep 'model name' /proc/cpuinfo | uniq -c
>>   4 model name      : Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
>> 
>> The same "rev-list --objects --all >/dev/null", best of five:
>> 
>> [current master, compiled with -O2]
>> real    0m39.956s
>> user    0m39.562s
>> sys     0m0.396s
>> 
>> [revert 1a812f3 (i.e., go back to memcmp), -O2]
>> real    0m42.161s
>> user    0m41.879s
>> sys     0m0.284s
>> 
>> It could be that the difference may be how well memcmp() is
>> optimized, no?  My box runs Debian with libc6 2.11.3-4 and gcc
>> 4.4.5.
>
> Yeah, that would make sense. I have libc6 2.13-38 and gcc 4.7.2 (debian
> unstable).

Just for fun, here is a totally unrelated comparison, both with current master, compiled with -O2 and running on the same box.

[without GIT_USE_LOOKUP] real 0m39.906s real 0m40.020s real 0m40.022s real 0m40.027s real 0m40.146s

[with GIT_USE_LOOKUP] real 0m40.336s real 0m40.376s real 0m40.452s real 0m40.503s real 0m40.572s

Maybe the Newton-Raphson is right as a concept (it does seem to result in fewer minor-faults) but the current code is implemented poorly and has a huge room for improvement?

[without GIT_USE_LOOKUP] 0inputs+0outputs (0major+182895minor)pagefaults 0swaps 0inputs+0outputs (0major+182920minor)pagefaults 0swaps 0inputs+0outputs (0major+183004minor)pagefaults 0swaps 0inputs+0outputs (0major+183006minor)pagefaults 0swaps 0inputs+0outputs (0major+183036minor)pagefaults 0swaps

[with GIT_USE_LOOKUP] 0inputs+0outputs (0major+182803minor)pagefaults 0swaps 0inputs+0outputs (0major+182886minor)pagefaults 0swaps 0inputs+0outputs (0major+182967minor)pagefaults 0swaps 0inputs+0outputs (0major+182997minor)pagefaults 0swaps 0inputs+0outputs (0major+182998minor)pagefaults 0swaps

Previous: Jeff KingNext: Jeff King
Message 6 of 10 in “Make GIT_USE_LOOKUP default?”
  1. Duy NguyenMar 17, 2013
  2. Junio C HamanoMar 17, 2013
  3. Jeff KingMar 18, 2013
  4. Junio C HamanoMar 18, 2013
  5. Jeff KingMar 18, 2013
  6. Junio C HamanoMar 18, 2013
  7. Jeff KingMar 18, 2013
  8. Junio C HamanoMar 18, 2013
  9. Duy NguyenMar 19, 2013
  10. Jeff KingMar 19, 2013

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.