Skip to content

Commit d9ea259

Browse files
committed
Add I/O and formatting performance benchmarks
- Add format vs fmt benchmark (format_vs_fmt.cc) - Add teju vs dragonbox floating point benchmark (teju_vs_dragonbox.cc) - Add file I/O vs stdio benchmark (file_vs_stdio.cc) These benchmarks compare fast_io performance against fmt library, dragonbox/teju floating point implementations, and standard stdio for various I/O and formatting operations.
1 parent b53b785 commit d9ea259

File tree

6 files changed

+719
-0
lines changed

6 files changed

+719
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(benchmark_formatting CXX)
3+
4+
include(FetchContent)
5+
6+
# Fetch fmt library
7+
FetchContent_Declare(
8+
fmt
9+
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
10+
GIT_TAG 10.2.1
11+
)
12+
FetchContent_MakeAvailable(fmt)
13+
14+
add_executable(benchmark.0019.formatting.format_vs_fmt ${CMAKE_CURRENT_LIST_DIR}/format_vs_fmt.cc)
15+
target_include_directories(benchmark.0019.formatting.format_vs_fmt PRIVATE ${CMAKE_SOURCE_DIR}/include)
16+
target_compile_features(benchmark.0019.formatting.format_vs_fmt PRIVATE cxx_std_20)
17+
target_link_libraries(benchmark.0019.formatting.format_vs_fmt PRIVATE fmt::fmt)

0 commit comments

Comments
 (0)