-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: add benchmarks comparing several float conv libraries...
- Loading branch information
Showing
12 changed files
with
1,589 additions
and
702 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 |
---|---|---|
@@ -1,9 +1,43 @@ | ||
c4_setup_benchmarking() | ||
|
||
#---------------------------------------------- | ||
|
||
# libraries to compare | ||
|
||
c4_require_subproject(fp | ||
REMOTE | ||
GIT_REPOSITORY https://github.com/jk-jeon/fp | ||
GIT_TAG master | ||
OVERRIDE | ||
#JKJ_FP_ENABLE_SUBPROJECT ON | ||
) | ||
|
||
c4_require_subproject(fast_float | ||
REMOTE | ||
GIT_REPOSITORY https://github.com/lemire/fast_float | ||
GIT_TAG v0.1.0) | ||
|
||
# ryu requires too much code; use an include for clarity | ||
include(./ryu.cmake) | ||
|
||
#---------------------------------------------- | ||
|
||
c4_add_executable(c4core-bm-charconv | ||
SOURCES bm_charconv.cpp | ||
LIBS c4core benchmark | ||
LIBS c4core benchmark ryu_c4 fast_float | ||
FOLDER bm) | ||
|
||
get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) | ||
if(cxx_std_17 IN_LIST known_features) | ||
target_link_libraries(c4core-bm-charconv PRIVATE jkj_fp) | ||
endif() | ||
|
||
c4_add_target_benchmark(c4core-bm-charconv xtoa FILTER "^xtoa_") | ||
c4_add_target_benchmark(c4core-bm-charconv atox FILTER "^atox_") | ||
|
||
#---------------------------------------------- | ||
|
||
option(C4CORE_BM_FLOAT_CMP "compare between alternative implementations for reading/writing floats" ON) | ||
if(C4CORE_BM_FLOAT_CMP) | ||
add_subdirectory(float) | ||
endif() |
Oops, something went wrong.