]> git.draconx.ca Git - liblbx.git/commit
Improve lbx_colour structure layout.
authorNick Bowler <nbowler@draconx.ca>
Wed, 22 Sep 2021 06:42:24 +0000 (02:42 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 22 Sep 2021 07:06:23 +0000 (03:06 -0400)
commit31b96a5d3d06122cbca0d38d32e0bbfa87cb58c7
tree6511631c1466cd6dd96cd1d49622525974706f2e
parent395b742050af148137758f1d4492a3922569fb91
Improve lbx_colour structure layout.

There is no point in using bit-fields for the components of this
structure.  The structure will never be smaller than 4 bytes so
there is no space savings compared to just using four unsigned
char members.  This avoids the compiler needing to do any kind
of bit shuffling.

In the typical case where such a structure has no padding, this
means the layout of these members will now exactly match the PAM
format, enabling a modest speedup.
src/image.h
src/pnm.c