Hi all,
I've been studying the code of Tablix with a view to improving my
understanding of how it works.
One oddity I noticed is that the "tuplemap" data structure is
dynamically allocated, despite being of fixed size. Each access then
requires a double indirection instead of a simple array index.
By changing tuplemap from:
tuple **tuplemap
to:
tuple tuplemap [TUPLEMAX];
removing the dynamic memory code and amending all accesses from:
tuplemap [c]->cid;
to:
tuplemap [c].cid;
I found an overall 5% increase in my GPM figure on a single CPU.
Drawbacks:
1) Memory use. Instead of using between 4k and 24k of RAM the new
version uses a fixed 20k. Both I feel are small enough not to worry
about.
2) All modules which reference tuplemap need to be upgraded. This took
me less than 5 minutes. "vi `grep -l tuplemap *.c`
I put it forward just in case it's acceptable.
Cheers,
John
Received on Sat Jul 24 23:36:07 2004
This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:42:16 CEST