[glib: 1/4] Optimize g_double_hash implementation
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/4] Optimize g_double_hash implementation
- Date: Tue, 11 Oct 2022 11:26:42 +0000 (UTC)
commit dd1f4f709ea8cad1a1d6184ee0883be128fb81d8
Author: wszqkzqk <wszqkzqk qq com>
Date: Mon Sep 26 08:26:27 2022 +0800
Optimize g_double_hash implementation
glib/ghash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/ghash.c b/glib/ghash.c
index 5fb722c04b..fc15428a83 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -2531,5 +2531,5 @@ g_double_equal (gconstpointer v1,
guint
g_double_hash (gconstpointer v)
{
- return (guint) *(const gdouble*) v;
+ return (guint) ((const guint) (*(guint64 *) v >> 32)) ^ (*(const guint *) v);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]