]> Kevux Git Server - fll/commit
Update: Optimize bitwise logic regarding removing bits.
authorKevin Day <thekevinday@gmail.com>
Wed, 3 Jan 2024 23:22:17 +0000 (17:22 -0600)
committerKevin Day <thekevinday@gmail.com>
Wed, 3 Jan 2024 23:22:17 +0000 (17:22 -0600)
commit185d78fbf16943ec70b36335c7997ef99f004f65
treef67ae0354ae0e1e581e7fd678541e3ebba94b399
parent45fe73f2c214a44cddea2d85182073de80efe6ca
Update: Optimize bitwise logic regarding removing bits.

I intended to eventually do this and I finally got around to it.
Change the logic to use "x &= ~y" rather than "x -= x & y" or "if (x | y) x -= y".

In the case of "x -= x & y", the resulting object code is identical in my tests.
However, the code is simpler to write with the "x &= ~y".

The "if (x | y) x -= y" results in a lot more commands in the object.
level_0/f_file/c/file.c
level_1/fl_conversion/c/private-conversion.c
level_3/byte_dump/c/byte_dump.c
level_3/controller/c/controller.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/utf8/c/utf8.c