Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add str_from_int function #7056

Merged
merged 1 commit into from
Aug 25, 2023

Commits on Aug 24, 2023

  1. Add str_from_int function

    Add more efficient function for formatting integer values as strings.
    
    A benchmark shows that using this function is significantly faster than using `str_format`. It is faster by a factor of 220 with Clang 15.0 O2 (https://quick-bench.com/q/BlNoLnlyqxipf4jvsFTUxKMHDJU) and by a factor of 11 with GCC 12.2 O2 (https://quick-bench.com/q/Fxf9lDCTqXBF4pIa_IyZ5R0IqYg).
    
    This increases FPS in the editor by ~25% when many numbers are rendered for switch/tele/speedup/tune layers or with "Show Info" being enabled.
    
    The additional static analysis for `std::to_chars` revealed that the wrong size was used in `CHud` for `aScoreTeam[TEAM_RED]` and `aScoreTeam[TEAM_BLUE]`.
    
    This requires incrementing the macOS deployment target from 10.13 to 10.15.
    Robyt3 committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    d2c9750 View commit details
    Browse the repository at this point in the history