Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [PATCH WIP] sha1-lookup: make selection of 'middle' less aggressive

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:02


On Sun, 30 Dec 2007, Marco Costalba wrote:
Sorry to ask, but just out of curiosity, what were the reasons to
choose zlib compression algorithm among the possible ones?
It's out there, it's common, it's stable, and it's very good "on average". 

In other words, other compression methods tend to be worse. No, zlib isn't 
perfect, but it was the obvious default choice for me (I've used it 
before, we use it in the kernel, it's usually good enough), and I actually 
expected the SHA1 to be the bigger expense.

Even today, I don't really know of a better compression choice, despite 
now being more aware of how critical uncompression performance is.

And quite honestly I'm not really even sure that the performance downside 
is entirely about zlib itself: I suspect a lot of the reason zlib shows up 
in the profiles is that the source data is usually cold in the cache, so 
it probably takes a lot of cache misses (it also will take all the page 
faults!).

Quite possibly, the cache miss costs dominate over any algorithmic costs.

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help