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

Re: Horrible re-packing?

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 5, 2006, 21:27 UTC
Message-ID
<Pine.LNX.4.64.0606051424320.5498@g5.osdl.org>
In-Reply-To
<20060605211436.GA58708@dspnet.fr.eu.org>
On Mon, 5 Jun 2006, Olivier Galibert wrote:
> 
> Why don't you just sort the full path+filename with a strcmp variant
> that starts by the end of the string for comparison?  May at least be
> simpler to understand.

That's actually what I was going to do, but we don't save the whole name, just the sorting number.

(This is actually an area where saving space is important - we can easily be working with hundreds of thousands or millions of objects, and we don't want to keep the name of each of them around).

So the suggested hash sort is designed exactly to end up approximating that ascii sort-from-end-of-string.

		Linus
Previous: Linus TorvaldsNext: Nicolas Pitre
Message 12 of 15 in “Horrible re-packing?”
  1. Linus TorvaldsJun 5, 2006
  2. Linus TorvaldsJun 5, 2006
  3. Linus TorvaldsJun 5, 2006
  4. Junio C HamanoJun 5, 2006
  5. Linus TorvaldsJun 5, 2006
  6. Junio C HamanoJun 5, 2006
  7. Junio C HamanoJun 6, 2006
  8. Olivier GalibertJun 5, 2006
  9. Nicolas PitreJun 5, 2006
  10. Chris WedgwoodJun 6, 2006
  11. Linus TorvaldsJun 6, 2006
  12. Linus TorvaldsJun 5, 2006
  13. Nicolas PitreJun 5, 2006
  14. Linus TorvaldsJun 5, 2006
  15. Nicolas PitreJun 5, 2006

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.