forked from AcademySoftwareFoundation/OpenColorIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the fast_float library to parse floating-point numbers
This commit brings in the amalgamated header of the fast_float library, and applies it to our uses of sscanf with %f. This library is locale-free, and does not incur the performance penalty of using a thread locale RAII class. Fixes AcademySoftwareFoundation#297 Fixes AcademySoftwareFoundation#379 Fixes AcademySoftwareFoundation#1022
- Loading branch information
Showing
8 changed files
with
3,151 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
|
||
# Sample ICC (modified) | ||
add_subdirectory(sampleicc) | ||
|
||
add_subdirectory(fast_float) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright Contributors to the OpenColorIO Project. | ||
|
||
# fast_float amalgamated header | ||
# https://github.com/fastfloat/fast_float | ||
add_library(fast_float::fast_float INTERFACE IMPORTED GLOBAL) | ||
set_target_properties(fast_float::fast_float PROPERTIES | ||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/src/include" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
fast_float number parsing library: 4x faster than strtod | ||
======================================================== | ||
|
||
The fast_float library provides fast header-only implementations for the C++ from_chars | ||
functions for `float` and `double` types. These functions convert ASCII strings representing | ||
decimal values (e.g., `1.3e10`) into binary types. We provide exact rounding (including | ||
round to even). In our experience, these `fast_float` functions many times faster than comparable number-parsing functions from existing C++ standard libraries. | ||
|
||
This is the amalgamated header of version 3.1.0, available at: | ||
|
||
https://github.com/fastfloat/fast_float/releases/tag/v3.1.0 | ||
|
Oops, something went wrong.