Y
Hacker News
new
|
ask
|
show
|
jobs
by
mordae
66 days 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.
1 comments
WASDx
66 days ago
Creating a custom tuple class to use as key could be faster though. Nested map lookups have less efficient memory access patterns.
link