Use bit positions and only create sparse string at the end of the process. More lightweight I reckon.