3 ms·
I cringed at those "aaa\0bbb\0ccc\0ddd" Map keys. That's much slower than nested maps and requires allocating the strings, giving GC more work to do.
by mordae 6mo ago
I cringed at those "aaa\0bbb\0ccc\0ddd" Map keys. That's much slower than nested maps and requires allocating the strings, giving GC more work to do.
- WASDx 6mo agoCreating a custom tuple class to use as key could be faster though. Nested map lookups have less efficient memory access patterns.