8 bools in 1 byte, the 1 bit boolean.

image credit to kafasi
:: Solution 1  :: 5,271,206 μs , 19,466,401,076 Cycles
:: Solution 2 :: 3,465,682 μs , 12,798,653,905 Cycles
:: 1 byte bool :: 119,495 μs , 441,289,454 Cycles
:: 2 byte bool :: 113,160 μs , 417,893,614 Cycles
:: 4 byte bool :: 102,384 μs , 378,097,709 Cycles
:: 1 byte sign :: 116,160 μs , 428,975,779 Cycles
:: 2 byte sign :: 107,785 μs , 398,044,927 Cycles
:: 4 byte sign :: 369,225 μs , 1,363,532,288 Cycles

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store