summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-30 01:29:19 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-09-19 15:09:51 -0400
commitfdde6bb5a7de9d1b013dd8da48d6a603b482f1f6 (patch)
treed7fd35a59d28d53c801c1ba14dec033f1d55663a /apps/plugins
parentef476ba298e52e96f981458784c1e7697a856ec7 (diff)
downloadrockbox-fdde6bb5a7de9d1b013dd8da48d6a603b482f1f6.tar.gz
rockbox-fdde6bb5a7de9d1b013dd8da48d6a603b482f1f6.zip
buflib: optimize getting start of block from end of block
The block header has a variable length due to the embedded name. The name length is stored at the back of the header after the name, in order to allow finding the start of the header if only the user data pointer is known (eg. from the handle table). The name length is actually not interesting in itself; storing the total length of the block header instead is marginally more efficient, saving one addition in handle_to_block(). Instead the extra arithmetic must be done by buflib_get_name(), which is a much less common operation than handle_to_block(). Change-Id: Ia339a1d2f556a11a49deae0871203e70548bd234
Diffstat (limited to 'apps/plugins')
0 files changed, 0 insertions, 0 deletions