"unserializing the EntityIdValue (e.g. from memcached) from the entity type + numeric id format to an EntityId object has significant impact on performance and memory usage.
The unserialization uses the PropertyId::newFromNumber and ItemId::newFromNumber methods are memory intensive, with use of strtr (#5 in https://github.com/filbertkm/wb-profiling/blob/master/memory_own-itempurge-1.25wmf1.txt).
If we can somehow move away from entity type + numeric id format in EntityIdValue, I think that would be better."