|
|
|
|
|
by cronos
4445 days ago
|
|
Probably no.
Author says that he uses IDs as keys. I can assume that they are 32 or 64 bit long. So even if they are 32 bits, you would need a 4GB slice to hold any potential key. Or make a dynamic array (well, slice) that would give even more overhead than a map (and would closely resemble what map does internally better anyways).
So only if those keys were really small, that would be a possible alternative. |
|
If the key-space is relatively sparse, this will waste more memory than the hash, of course.