Skip to content

Bit Twiddling in Shell Expansion

Michael Aaron Murphy requested to merge mmstick:optimizations into master

The shell expansion logic contains a large number of boolean values, each which will consume 8 bits of memory and an 8-bit register even though booleans are logically 1-bit values. By collapsing all the booleans into a single 8-bit integer and using bit-twiddling operations, shell expansion should be much faster and use less memory.

This also allows me to refactor some code in shell expansion to keep Clippy quiet.

Merge request reports