From 510b10b96b546fcc6c6b6be85050305ddd192a41 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 5 Feb 2022 17:30:11 +0800 Subject: replace some hash table usage by tuples Previously I used hash tables, which consume too much memory. Now the critical parts are replaced by a new hand-written library called "tuple.h". Now we can easily parse larger inputs. I haven't tested its limits, though. --- src/ht.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ht.c') diff --git a/src/ht.c b/src/ht.c index 770eff6..de1db2d 100644 --- a/src/ht.c +++ b/src/ht.c @@ -541,7 +541,7 @@ pair4_hf(CCR_MOD(void *) key) { ((pair4 *) key)->x, ((pair4 *) key)->y, ((pair4 *) key)->z, - ((pair4 *) key)->w); + ((pair4 *) key)->u); /* fleprintf("Hash of (%ld, %ld, %ld) is %ld\n", * ((pair3 *) key)->x, @@ -564,7 +564,7 @@ pair4_cf(CCR_MOD(void *) keya, CCR_MOD(void *) keyb) { return ((pair4 *) keya)->x == ((pair4 *) keyb)->x && ((pair4 *) keya)->y == ((pair4 *) keyb)->y && ((pair4 *) keya)->z == ((pair4 *) keyb)->z && - ((pair4 *) keya)->w == ((pair4 *) keyb)->w; + ((pair4 *) keya)->u == ((pair4 *) keyb)->u; } ht * -- cgit v1.2.3-18-g5258