Rewrite get using nvGet()

Profile data shows much heavier use of ArrayData::nvGet(),
nvGetCell(), and exists(), than get().  So rewrite get()
using nvGet().
Esse commit está contido em:
Edwin Smith
2013-06-25 22:29:22 -07:00
commit de Sara Golemon
commit 685fe164ae
11 arquivos alterados com 33 adições e 109 exclusões
-18
Ver Arquivo
@@ -571,24 +571,6 @@ bool HphpArray::exists(const StringData* k) const {
return pos != ssize_t(ElmIndEmpty);
}
CVarRef HphpArray::get(int64_t k, bool error /* = false */) const {
ElmInd pos = find(k);
if (pos != ElmIndEmpty) {
Elm* e = &m_data[pos];
return tvAsCVarRef(&e->data);
}
return error ? getNotFound(k) : null_variant;
}
CVarRef HphpArray::get(const StringData* key, bool error /* = false */) const {
ElmInd pos = find(key, key->hash());
if (pos != ElmIndEmpty) {
Elm* e = &m_data[pos];
return tvAsCVarRef(&e->data);
}
return error ? getNotFound(key) : null_variant;
}
//=============================================================================
// Append/insert/update.