[glib/hash-me-faster: 8/8] hash: Remove an assertion from the hot path
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/hash-me-faster: 8/8] hash: Remove an assertion from the hot path
- Date: Thu, 10 Oct 2019 13:24:50 +0000 (UTC)
commit 1fb3628fb3c00dc8373a666a0f5a8ee150d756a4
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 10 06:56:38 2019 -0400
hash: Remove an assertion from the hot path
This assert is using atomics and was showing up
in some cache-heavy GTK profiles. Remove it.
glib/ghash.c | 7 -------
1 file changed, 7 deletions(-)
---
diff --git a/glib/ghash.c b/glib/ghash.c
index e61b03788..171011b39 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -463,13 +463,6 @@ g_hash_table_lookup_node (GHashTable *hash_table,
gboolean have_tombstone = FALSE;
guint step = 0;
- /* If this happens, then the application is probably doing too much work
- * from a destroy notifier. The alternative would be to crash any second
- * (as keys, etc. will be NULL).
- * Applications need to either use g_hash_table_destroy, or ensure the hash
- * table is empty prior to removing the last reference using g_hash_table_unref(). */
- g_assert (!g_atomic_ref_count_compare (&hash_table->ref_count, 0));
-
hash_value = hash_table->hash_func (key);
if (G_UNLIKELY (!HASH_IS_REAL (hash_value)))
hash_value = 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]