Thanks for the answer! By the way, my wrapper is heavily based on yours, I only added `sparse_hash_map` (which is almost identical to `dense_hash_map`) and a pretty simple Python wrapper.
Unfortunately, I need `sparse_hash_map` as I have several hundred million entries to store at least. I don't know yet how many exactly.
Still, you've given me an idea. I could insert a (bijective) hashing function into the Cython wrapper. This wouldn't be particularly convenient, since I would have to convert the existing data to this representation, and iterating through keys would require a reverse transformation, but that can solve the problem nonetheless.
I don't really know C++ well enough to understand what else I could do here. Maybe I could write a thin wrapper around `sparse_hash_map` that would instantiate template parameters, and base my Cython wrapper on top of that, for example?
воскресенье, 27 декабря 2015 г., 6:56:36 UTC+3 пользователь Matthew Honnibal написал: