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

Re: Yet another base64 patch

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Apr 14, 2005, 17:02 UTC
Message-ID
<425EA23F.6010900@zytor.com>
In-Reply-To
<Pine.LNX.4.58.0504140114260.7211@ppc970.osdl.org>
Linus Torvalds wrote:
Show 8 quoted lines
> 
> So why is "base64" worse than the stock one?
> 
> As mentioned, the "flat" version may be faster, but it really isn't an
> option. 32000 objects is peanuts. Any respectable source tree may hit that
> in a short time, and will break in horrible ways on many Linux
> filesystems.
> 
If it does, it's not because of n_link; see previous email.

I have used ext2 filesystems with hundreds of thousands of files per directory back in 1996. It was slow but didn't break anything.

The only filesystem I know of which has a 2^16 entry limit is FAT.
Show 5 quoted lines
> So you need at least a single level of subdirectory. 
> 
> What I don't get is why the stock hex version would be better than base64.
> 
> I like the result, I just don't _understand_ it.

The base64 version has 2^12 subdirectories instead of 2^8 (I just used 2 characters as the hash key just like the hex version.) So it ascerbates the performance penalty of subdirectory hashing.

	-hpa
Previous: Linus TorvaldsNext: Paul Dickson
Message 32 of 34 in “Yet another base64 patch”
  1. H. Peter AnvinApr 14, 2005
  2. Christopher LiApr 14, 2005
  3. H. Peter AnvinApr 14, 2005
  4. Christopher LiApr 14, 2005
  5. H. Peter AnvinApr 14, 2005
  6. H. Peter AnvinApr 14, 2005
  7. Linus TorvaldsApr 14, 2005
  8. H. Peter AnvinApr 14, 2005
  9. Linus TorvaldsApr 14, 2005
  10. bert hubertApr 14, 2005
  11. H. Peter AnvinApr 14, 2005
  12. bert hubertApr 14, 2005
  13. Linus TorvaldsApr 15, 2005
  14. H. Peter AnvinApr 15, 2005
  15. David LangApr 17, 2005
  16. H. Peter AnvinApr 18, 2005
  17. H. Peter AnvinApr 15, 2005
  18. Paul JacksonApr 15, 2005
  19. David A. WheelerApr 17, 2005
  20. Paul JacksonApr 17, 2005
  21. David A. WheelerApr 17, 2005
  22. Paul JacksonApr 17, 2005
  23. David A. WheelerApr 17, 2005
  24. Petr BaudisApr 17, 2005
  25. David A. WheelerApr 18, 2005
  26. Kevin SmithApr 18, 2005
  27. David A. WheelerApr 18, 2005
  28. Daniel BarkalowApr 17, 2005
  29. David A. WheelerApr 17, 2005
  30. H. Peter AnvinApr 14, 2005
  31. Linus TorvaldsApr 14, 2005
  32. H. Peter AnvinApr 14, 2005
  33. Paul DicksonApr 15, 2005
  34. H. Peter AnvinApr 18, 2005

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.