Skip to content

Commit

Permalink
Thu Nov 3 22:06:18 2016 Vladimir Makarov <vmakarov@redhat.com>
Browse files Browse the repository at this point in the history
	* st.c (MINIMAL_POWER2): Make it equal to 2.
	(MAX_POWER2_FOR_TABLES_WITHOUT_BINS): Make it equal to 4.
  • Loading branch information
vnmakarov committed Nov 4, 2016
1 parent 5024d3e commit f4d2bf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Thu Nov 3 22:06:18 2016 Vladimir Makarov <vmakarov@redhat.com>

* st.c (MINIMAL_POWER2): Make it equal to 2.
(MAX_POWER2_FOR_TABLES_WITHOUT_BINS): Make it equal to 4.

Wed Nov 2 23:22:05 2016 Vladimir Makarov <vmakarov@redhat.com>

* st.c (features): Decrease # bins two times for tables < 2*32 for
Expand Down
4 changes: 2 additions & 2 deletions st.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ do_hash(st_data_t key, st_table *tab) {
}

/* Power of 2 defining the minimal number of allocated entries. */
#define MINIMAL_POWER2 3
#define MINIMAL_POWER2 2

#if MINIMAL_POWER2 < 2
#error "MINIMAL_POWER2 should be >= 2"
#endif

/* If the power2 of the allocated `entries` is less than the following
value, don't allocate bins and use a linear search. */
#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS 3
#define MAX_POWER2_FOR_TABLES_WITHOUT_BINS 4

/* Return smallest n >= MINIMAL_POWER2 such 2^n > SIZE. */
static int
Expand Down

0 comments on commit f4d2bf3

Please sign in to comment.