In an effort to make Field (aka type) comparison cheap, so that it can be done more often, use a global hash table to prevent duplicate instances of Field (and associated sub-classes). operator== for Field becomes simple pointer comparison (the existing comparison is renamed to epics::pvData::compare()).
This does make Field creation more expensive, but this is not something which a well behaved program should do frequently (after startup).
Hashing is done with the simple (though inefficient) expedient of applying epicsStrHash() to the output of operator<<.
In an effort to make Field (aka type) comparison cheap, so that it can be done more often, use a global hash table to prevent duplicate instances of Field (and associated sub-classes).
operator==
for Field becomes simple pointer comparison (the existing comparison is renamed toepics::pvData::compare()
).This does make Field creation more expensive, but this is not something which a well behaved program should do frequently (after startup).
Hashing is done with the simple (though inefficient) expedient of applying
epicsStrHash()
to the output ofoperator<<
.