c++ - Dictionary access optimization describen - does it take place anywhere? -
most of compiler nerds have read google's paper on v8 object property access resulting technique (in-)directly accessing array member. question is:
does optimize dictionary access same way (assigning fixed index (compile time) fixed key)? doesn't have applicable everywhere perhaps when it's compilation-unit wide? or dictionary readonly? or between compilation units @ pass? whatever, maybe unrolling dict. access or inlineing using fixed array index instead of key.
i know how constant time lookup dictionaries work, maybe proposed optimization takes place farther boost compiled languages (e.g. c++) hardware coached deal v-table-like structures @ runtime.
please, if know of that, give me hunch. give thanks much!
tl;dr want know of existing way optimize dictionary access, (e.g. accessing std::map
via array index), not of internal struct/object arrangment in particular language
doubtful
while in theory possible (being std::map
implementation part of standard library) know of no c++ compiler performs such trick.
and not have to: if want array indexing in c++, pick array , index (possibly named constants).
c++ performance optimization dictionary hashtable
No comments:
Post a Comment