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

Re: [PATCH] diff-delta.c: pack the index structure

From: Nicolas Pitre <hidden>
Date: 2016-06-15 22:43:34

On Sat, 8 Sep 2007, David Kastrup wrote:
In normal use cases, the performance wins are not overly impressive:
we get something like 5-10% due to the slightly better locality of
memory accesses using the packed structure.
The gain is probably counterbalanced by the fact that you're copying the 
whole index when packing it, which is unfortunate.

Also, could you provide actual test results backing your performance 
claim?  5-10% is still not negligible.
-	struct index_entry *entry, **hash;
+	struct unpacked_index_entry *entry, **hash;
+	struct index_entry *aentry, **ahash;
What does the "a" stand for?
+	mem = index+1;
[...]
+	for (i=0; i<hsize; i++) {
[...]
+		for (entry=hash[i]; entry; entry=entry->next)
Minor style nit: please add spaces around "+", "=", "<", etc. for 
consistency.

Otherwise that looks fine to me.


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