aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-11-06 23:18:42 -0800
committerChad Versace <[email protected]>2012-11-12 15:52:43 -0800
commit6991c2922f530d88622900039c24bd04d9c15ce7 (patch)
tree12696f97f637f858657b53b5abf65c69cddd1332 /src/glsl/glsl_parser_extras.cpp
parent35fd61bd99c15c2e13d3945b41c4db7df6e64319 (diff)
mesa: Convert the hash table for GL object ids to the open-addressing hash.
The previous 1023-entry chaining hash table never resized, so it was very inefficient when there were many objects live. While one could have an even more efficient implementation than this (keep an array for genned names with packed IDs, or take advantage of the fact that key == hash or key == *(uint32_t *)data to store less data), this is fairly fast, and I want a nice replacement hash table for other parts of Mesa, too. It improves Minecraft performance 12.3% +/- 1.4% (n=9), dropping hash lookups from 8% of the profile to 0.5%. I also tested cairo-gl, which should be a pessimal workload for this hash table: around 247000 FBOs created and destroyed, only around 65 live at any time, and few lookups of them between creation and destruction. No statistically significant performance difference at n=76 (mean 20.3/20.4 seconds, sd 2.8/3.2 seconds). If I remove the >20 seconds outliers that appear to be due to thermal throttling, there's possibly a .97% +/- 0.31% performance win (n=61/59). The choice of cutoff for outliers feels a lot like cooking the data, but I've gone through this process 3 times for minor iterations of the code with the same conclusion each time. Reviewed-by: Brian Paul <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1)
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
0 files changed, 0 insertions, 0 deletions