3 ms·
I assumed they used C++ std::map<>
by ape4 12y ago
I assumed they used C++ std::map<>
- nly 12y agoPHP isn't written in C++. It's written in some pretty macro dense C. Even if it were, <map> isn't a hash table.
- acmd 12y agoBut std::unordered_map is. I wonder what would be the actual C++ memory consumption using that.
- sharpneli 12y agoC++ unordered map does not maintain the order of the elements, which PHP does. So it is not a fair comparison.
- nly 12y agoSomething approximately equivalent would be Boosts multi_index with a couple of indexes. using php_array_t = multi_index_container< int64_t, indexed_by< random_access<>, hashed_unique<identity<int64_t>> > >; There are so many design considerations at play though that such a comparison would be pointless.