mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
Bitmap: Add Bitmap::find_next_range_of_unset_bits()
AK::Bitmap is extended with find_next_range_of_unset_bits(). The function is implemented using count_trailing_zeroes_32(), which is optimized on many platforms, that gives a huge performance boost. Functions find_longest_range_of_unset_bits() and find_first_fit() are implemented with find_next_range_of_unset_bits(). According to benchmarks, they are 60-100% faster.
This commit is contained in:
parent
471db7ce0a
commit
fbcc798f3f
2 changed files with 112 additions and 54 deletions
|
@ -97,4 +97,4 @@ template<typename T>
|
|||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue