Change WordBreakProperty underlying type to int8_t (#715)

This yields a ~1% performance improvements, likely
because the smaller types causes less load on memory
when bisearching the WordBreakProperty interval table

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Stefan Ravn van Overeem 2023-08-03 17:41:54 +02:00 committed by GitHub
parent cebe49dd23
commit b0a7f88f07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,10 @@ current (development)
See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). See the [OSC 8 page](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).
FTXUI support proposed by @aaleino in [#662](https://github.com/ArthurSonzogni/FTXUI/issues/662). FTXUI support proposed by @aaleino in [#662](https://github.com/ArthurSonzogni/FTXUI/issues/662).
### Screen
- Breaking: `WordBreakProperty` becomes a uint8_t enum. This yields a 0.8%
performance improvement.
### Build ### Build
- Check version compatibility when using cmake find_package() - Check version compatibility when using cmake find_package()

View File

@ -32,7 +32,7 @@ int GlyphCount(const std::string& input);
// Properties from: // Properties from:
// https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/WordBreakProperty.txt // https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/WordBreakProperty.txt
enum class WordBreakProperty { enum class WordBreakProperty : int8_t {
ALetter, ALetter,
CR, CR,
Double_Quote, Double_Quote,