提交 e1f1f965 编写于 作者: B Behdad Esfahbod

[set] Tune size again

Switch from a 128+64 hierarchy, to 32+32. New page size is 1024.
This should make set iteration faster, without affecting other op
performances much.
上级 20022575
......@@ -177,11 +177,11 @@ struct hb_set_t
return 0;
}
static const unsigned int PAGE_BITS = 8192; /* Use to tune. */
typedef uint32_t elt_t;
static const unsigned int ELT_BITS = sizeof (elt_t) * 8;
static const unsigned int PAGE_BITS = ELT_BITS * ELT_BITS; /* 1024. Use to tune. */
static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
typedef uint64_t elt_t;
#if 0 && HAVE_VECTOR_SIZE
/* The vectorized version does not work with clang as non-const
* elt() errs "non-const reference cannot bind to vector element". */
......@@ -192,7 +192,6 @@ struct hb_set_t
vector_t v;
static const unsigned int ELT_BITS = sizeof (elt_t) * 8;
static const unsigned int ELT_MASK = ELT_BITS - 1;
static const unsigned int BITS = sizeof (vector_t) * 8;
static const unsigned int MASK = BITS - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册