Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
For accessing InnoDB page header fields, we should prefer direct access via uint16_t*, uint32_t*, uint64_t* when the fields are known to be aligned. We should also avoid unnecessary byte order conversions when they do not matter (say, writing 0 or ~0, or comparing to those values).
This could slightly improve performance.
It looks like small memcpy(), memset(), memcmp() can be optimized into simple instructions. It is not only IA-32 and AMD64 that support unaligned access; also POWER8 and Aarch64 seem to do that.