[MDEV-21133] Optimize access to InnoDB page header fields Created: 2019-11-23  Updated: 2020-05-07  Resolved: 2019-11-26

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.5.1

Type: Task Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance


 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.


Generated at Thu Feb 08 09:04:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.