Commit Graph

5 Commits (b7942c58cc6c028754340c9f8ded0f6cd1b43363)

Author SHA1 Message Date
Glenn Strauss ad9b7e009b [core] inline buffer as part of DATA_UNSET key
(instead of key being (buffer *))
3 years ago
Glenn Strauss b2991c686d [core] perf: array.c performance enhancements
mark array_get_index() as hot, rewrite to be pure and return sorted pos

mark routines as pure, as appropriate

mark routines as cold if used only at startup for config processing

mark params const, as appropriate

array_get_buf_ptr() for modifiable value buffer after insert into array

uint32_t used and size members instead of size_t

remove a->unique_ndx member; simply add to end of array for value lists
remove du->is_index_key member; simply check buffer_is_empty(du->key)

array_insert_key_value() used to be a hint that lookup could be skipped,
but the state from array_get_index() is now saved and reused internally,
so the distinction is no longer needed.  Use array_set_key_value().
3 years ago
Glenn Strauss c98d89a4bb [tests] #undef NDEBUG before assert.h in t/test_* 5 years ago
Glenn Strauss 002a4c524d [core] array_get_int_ptr() 5 years ago
Glenn Strauss 66ff05db8f [tests] t/test_array.c
(more tests should be added, but starting with something has benefits)
5 years ago