allergies/allergies.py
def _lst_bitops_improved(self) -> List[str]:
        """
        This basically does the same thing like `_lst_bitops()`, but instead of shifting the score for the length of
        the allergens list, it only considers the number of bits in the modulu score.

        IDK if this really improves anything (have not benchmarked), but I did not like the fact that the other bitops
        solution just blindly does unecessary shifts (which are probably not that expensive).
        """

        score_mod = self._score % (2**len(self._allergens))

        return [self._allergens[i] for i in range(len(bin(score_mod)[2:])) if score_mod >> i & 1]

        This basically does the same thing like `_lst_bitops()`, but instead of shifting the score for the length of
        the allergens list, it only considers the number of bits in the modulu score.

        IDK if this really improves anything (have not benchmarked), but I did not like the fact that the other bitops
        solution just blindly does unecessary shifts (which are probably not that expensive).
        
This basically does the same thing like `_lst_bitops()`, but instead of shifting the score for the length of
the allergens list, it only considers the number of bits in the modulu score.

IDK if this really improves anything (have not benchmarked), but I did not like the fact that the other bitops
solution just blindly does unecessary shifts (which are probably not that expensive).
This basically does the same thing like ` _lst_bitops () ` but instead of shifting the score for the length of the allergens list it only considers the number of bits in the modulu score . IDK if this really improves anything ( have not benchmarked ) but I did not like the fact that the other bitops solution just blindly does unecessary shifts ( which are probably not that expensive ) .
def _lst_bitops_improved(self) -> List[str]:
        score_mod = self._score % (2**len(self._allergens))
        return [self._allergens[i] for i in range(len(bin(score_mod)[2:])) if score_mod >> i & 1]
def _lst_bitops_improved ( self ) -> List [ str ] : score_mod = self . _score % ( 2 ** len ( self . _allergens ) ) return [ self . _allergens [ i ] for i in range ( len ( bin ( score_mod ) [ 2 : ] ) ) if score_mod >> i & 1 ]
This basically does the same thing like `_lst_bitops()`, but instead of shifting the score for the length of
the allergens list, it only considers the number of bits in the modulu score.
This basically does the same thing like ` _lst_bitops () ` but instead of shifting the score for the length of the allergens list it only considers the number of bits in the modulu score .
"""
        This basically does the same thing like `_lst_bitops()`, but instead of shifting the score for the length of
        the allergens list, it only considers the number of bits in the modulu score.

        IDK if this really improves anything (have not benchmarked), but I did not like the fact that the other bitops
        solution just blindly does unecessary shifts (which are probably not that expensive).
        """
self