Does std::map<std::string, std::tuple<bool, bool>>
(2 bit value) waste as much memory/CPU going to waste as much memory/CPU as std::map<std::string, uint8_t>
(8 bit value)?
Do std::map<std::string, uint8_t>
values use 4x less, 2x less, or waste as much as std::map<std::string, uint32_t
? On which compilers/devices?
If so, on which architectures/compilers? If not, how much does the small type as value reduce resource uses?
enum {0,1,2,3) f(std::string);
performance of 2 std::set
(or 2 std::unordered_set
) vs 1 std::map
(or 1 std::unordered_map
) to cache the results?
Performed over 100 searches with all combinations of words that could relate to this,
on various search engines,
none of the results were relevant to this.
One of the results actually said that 1 std::set
outperforms 1 std::map
(which is mathematically impossible).
Most of the results are just “How to use std::set” or “what method functions does one of these have which the other does not have”, or benchmarks of std::set
vs std::unordered:set
vs boost:unordered_set
Just want performance facts of std::set
vs std::map
(or std::set
vs std::map
).
Could produce benchmarks but just have one device with 1 compiler to test on (Android, with Clang/Termux,) so this would not allow to produce code that is overall the most fast for most uses.