Sigrid Solveig Haflínudóttirtables: bounded compare and optimizations5be54231 year agoHistory
23 lines · 537 B · C
RawDownload
#pragma once #define HT_N_INLINE 32 typedef struct {	void **table;	int size;	int num;	// FIXME(sigrid): to skip over non-items in for-each	// put it on the stack instead?	int i;	void *_space[HT_N_INLINE];}sl_aligned(8) sl_htable; // define this to be an invalid key/value#define HT_NOTFOUND ((void*)1) // initialize and freesl_htable *htable_new(sl_htable *h, int size) sl_nonnull(1);void htable_free(sl_htable *h) sl_nonnull(1); // clear and (possibly) change sizevoid htable_reset(sl_htable *h, int sz) sl_nonnull(1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t