Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 pxq 字节的数据存储在哈希中。
哪个更有效率?
具有 pxq 个条目的散列每个存储一个字节或具有 p 个条目的散列每个存储 q 个字节的数据
键是稀疏的内存地址
您不需要将第二个值作为 aq 字节存储在哈希中,而只是对它们的引用存储在内存中的其他位置。但是,第一个想法是使用 stl::map。