Re:PHP 7's new hashtable implementation
by sharpneli on Tuesday December 23, 2014 @11:54AM
(#8788884)
C++ unordered map does not maintain the order of the elements, which PHP does. So it is not a fair comparison.
[ Parent
| on HN ]
Something 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.