ALEMIL

Welcome to a blog about application and game development

Bitmask - why, how and when

Bitmask - why, how and when 2018-03-19 22:03:00
Est. read time: 3 minutes, 34 seconds

Bitmasks are a very useful way to compress multiple boolean flags in a single variable. It can reduce memory usage and operations on bits are basically as fast as they can get. In practice, any time you want to have multiple flags describing something in your application, a bitmask could be the right tool for the job.

Comments