Closed Jille closed 9 months ago
@SnoozeThis https://github.com/alecthomas/mph/pull/15
(https://snoozeth.is/tHDCudkwLCw) I will wait until https://github.com/alecthomas/mph/pull/15 is merged and then add a comment.
Can you consolidate these into one PR please? It just creates more work for me if there are N different PRs.
Sure! Most projects prefer them all split up, so I went that route initially :)
An error occurred while snoozing: Pull request was closed without being merged
Just use ints pointing into the large byte slice.
Mmap() creates two
[]byte
s per key value pair. This creates significant work for the garbage collector which has to scan through all of these in each mark phase. For my 2.7M keys, it adds 5.4M pointers to be scanned. By just using integers for offsets the garbage collector can ignore it completely.This does trade off some more work for the Builder which has to append all the keys+values into a single byte slice.