Store the hash in the tree instead of recalculating

This commit is contained in:
Erica Fischer
2024-02-02 14:46:58 -08:00
parent 4b8574aa87
commit 80e264daa9
2 changed files with 12 additions and 6 deletions
+2
View File
@@ -4,7 +4,9 @@
struct stringpool {
unsigned long left = 0;
unsigned long right = 0;
unsigned long off = 0;
size_t hash; // hash of the string at this node
};
long long addpool(struct memfile *poolfile, struct memfile *treefile, const char *s, char type, std::vector<ssize_t> &dedup);