4 ms·
reading or writing arr[i] will require 1 or 2 4-byte memory accesses (or 3 1-byte memory accesses) and few bit operations to construct result value, because gen
by vbezhenar 11y ago
reading or writing arr[i] will require 1 or 2 4-byte memory accesses (or 3 1-byte memory accesses) and few bit operations to construct result value, because generally processors can't access 24-bit value. That probably won't hurt performance a lot, but anyway it's much easier to work with 32-bit arrays.
- TazeTSchnitzel 11y agoOr, it requires a 2-byte memory access and a 1-byte memory access.
- vardump 11y agoModern CPUs have only one sort of accesses from RAM. 64 byte ones.