1) st use function instead of macroc3328a2 - turning some macros-es into functions.
It seems that modern compiler (gcc 4.5) with aggressive optimization (-O3 enabled by default in ruby-1.9.3) better optimizes functions. Also, it uses tight loop for searching in a packed table.
2) st macroses for packed tablesf92af2b - several simple macros-es to organize packed table access
3) st macroses for allocationfaf83e3 - wrap allocation of st_* structs into macroses, so that they could be overridden in a future to optimize hash construction
This patch makes following changes:
1)
st use function instead of macro
c3328a2 - turning some macros-es into functions.It seems that modern compiler (gcc 4.5) with aggressive optimization (-O3 enabled by default in ruby-1.9.3) better optimizes functions. Also, it uses tight loop for searching in a packed table.
2)
st macroses for packed tables
f92af2b - several simple macros-es to organize packed table access3)
st macroses for allocation
faf83e3 - wrap allocation of st_* structs into macroses, so that they could be overridden in a future to optimize hash construction