Created attachment 19800 [details] [review] patch _cairo_hash_table_insert can use key_unique = TRUE when calling _cairo_hash_table_lookup_internal because the rules don't permit inserting an entry with an existing key. This saves on having to search through dead entries (as the first dead can be used), and means that the cairo_hash_keys_equal_func_t need not be called on live entries.
Pushed - it looks sane and benefits from the hash-table policy already in force. In particular this patch had a dramatic impact for my cairo-script test cases, causing a 100-fold reduction in the number of key compares.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.