3 ms·
Actually works somewhat well for mmap'ed access, too, by using a macro or function to "dereference" "pointers" (offsets).
by blattimwind 8y ago
Actually works somewhat well for mmap'ed access, too, by using a macro or function to "dereference" "pointers" (offsets).
- a_t48 8y agoOr even an OffsetPtr class with overloaded arrow and dereference operator, if you swing that way. :)
- DaiPlusPlus 8y agoWhat’s the runtime performance of that in-practice? Does x86, x64 and ARM have support for relative offset pointers without any performance impact? And do compilers use them?
- blattimwind 8y agoYes, address generation can at the very least do [reg + constant], and on x86, much much more. These are bread and butter optimizations constantly used by compilers all over the place, because this is how field access works.