#include "test-tool.h"
#include "git-compat-util.h"
#include "hashmap.h"
#include "strbuf.h"
#include "string-list.h"
struct test_entry
{ … };
static int test_entry_cmp(const void *cmp_data,
const struct hashmap_entry *eptr,
const struct hashmap_entry *entry_or_key,
const void *keydata)
{ … }
static struct test_entry *alloc_test_entry(unsigned int hash,
const char *key,
const char *value)
{ … }
#define HASH_METHOD_FNV …
#define HASH_METHOD_I …
#define HASH_METHOD_IDIV10 …
#define HASH_METHOD_0 …
#define HASH_METHOD_X2 …
#define TEST_SPARSE …
#define TEST_ADD …
#define TEST_SIZE …
static unsigned int hash(unsigned int method, unsigned int i, const char *key)
{ … }
static void perf_hashmap(unsigned int method, unsigned int rounds)
{ … }
#define DELIM …
int cmd__hashmap(int argc UNUSED, const char **argv UNUSED)
{ … }