[PATCH 2/7] diet: use smaller LIST_NODE_NR (29 -> 13)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently the size of the array used for ptrlist is 29.
However, some inspection shows that the mean size of ptrlists
is much smaller: around 2.5 - 5 only. This means that most memory
allocated for ptrlists are never used.

Change this by changing the size to the conservative value of 13.
With this value, on some test programs, memory used for ptrlists
is only 43% - 48% smaller or 24% - 28% for the total memory.
This difference in memory consumption allow also to win some time:
5 - 7% in the conditions used for the test but YMMV.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 ptrlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ptrlist.h b/ptrlist.h
index d09be2f51..b605bb858 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -22,7 +22,7 @@
  */
 #define MKTYPE(head,expr)		({ (TYPEOF(head))(expr); })
 
-#define LIST_NODE_NR (29)
+#define LIST_NODE_NR (13)
 
 struct ptr_list {
 	int nr;
-- 
2.13.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux