model-writtenrun 7142 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis proposed replacing the collation cache's dynahash table with simplehash to reduce repeated lookup costs during text comparisons, while also suggesting a single-entry cache as a possible further optimization #1.
- Peter Eisentraut briefly supported the proposed method #2, and John Naylor recommended using the inline murmurhash32 function for hashing collation OIDs #3.
- Jeff incorporated John's suggestion and reduced the initial table size in #4; his benchmark showed overhead falling from 24% to 4%, leading him to question whether an additional single-entry cache was worthwhile.
- Andreas Karlsson measured 11% overhead with simplehash and approximately 1% with an additional last-locale cache, supplied a proof-of-concept patch, and endorsed committing simplehash separately while noting that alternating collations could limit the extra cache's benefit #5.
- Jeff landed the simplehash revision from #4 unchanged apart from base context as 005c6b833f, then confirmed that the last-locale optimization would wait until related refactoring settled #6.
- At the thread's final message, simplehash had landed and the last-locale cache remained deferred #6; the latter subsequently landed as 12d3345c0d, preserving Andreas's implementation from #5 with naming and comment cleanup to prevent a regression from planned removal of lc_collate_is_c().