-
Notifications
You must be signed in to change notification settings - Fork 455
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
Text format (e.g. IridasCube) parsing optimizations #2074
base: main
Are you sure you want to change the base?
Commits on Oct 1, 2024
-
Iridas .cube and other text format parsing optimizations
Primarily driven by a wish to increase performance of parsing .cube files. But the functions that are added or changed are used across parsing of all/most of text based formats. With these changes, parsing "Khronos PBR Neutral" .cube file (5.4MB) on Ryzen 5950X / VS2022 Release build: 167ms -> 123ms. - Add locale independent IsSpace(char). Somewhat similar to 3aab90d, whitespace trimming perhaps should not be locale dependent. - Add IsEmptyOrWhiteSpace() and use that inside ParseUtils::nextline, instead of doing Trim(line).empty(). - Add StringUtils::StartsWith(char) and use that in various parsers that were constructing whole std::string object just to check for a single character. - When building for C++17 or later, NumberUtils can use standard <charconv> from_chars functions (except on Apple platforms, where those are not implemented for floating point types as of Xcode 15). This has advantage of not having to deal with errno or locales. Saves some thread local storage accesses and function calls (e.g. on Windows errno is actually a function call). - There's a CMake setup change that adds /Zc:__cplusplus flag for MSVC; for backwards compat reasons it does not report proper C++ version detection defines otherwise. Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 769e887 - Browse repository at this point
Copy the full SHA 769e887View commit details -
Fix test failures (char can be signed, doh)
Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 74b465a - Browse repository at this point
Copy the full SHA 74b465aView commit details
Commits on Oct 2, 2024
-
Tests: add unit test coverage for NumberUtils::from_chars directly
Currently it was only tested indirectly via XMLReaderUtils_tests and file format tests Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f5be6a - Browse repository at this point
Copy the full SHA 8f5be6aView commit details -
Fix from_chars in C++17 code path to understand hex prefix (0x) and s…
…kip optional whitespace To match the pre-C++17 behavior that was there before Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8428381 - Browse repository at this point
Copy the full SHA 8428381View commit details -
Fix detection of <charconv> float from_chars availability
Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3353ac4 - Browse repository at this point
Copy the full SHA 3353ac4View commit details -
Tests: Fix missing <limits> include for gcc
Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3f65bb3 - Browse repository at this point
Copy the full SHA 3f65bb3View commit details -
Tests: fix uninitialized variable warning-as-error on gcc
Signed-off-by: Aras Pranckevicius <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 53fbca9 - Browse repository at this point
Copy the full SHA 53fbca9View commit details
Commits on Oct 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 27f8ab7 - Browse repository at this point
Copy the full SHA 27f8ab7View commit details