Skip to content

Nocpp test#445

Open
sundb wants to merge 4 commits intounstablefrom
nocpp-test
Open

Nocpp test#445
sundb wants to merge 4 commits intounstablefrom
nocpp-test

Conversation

@sundb
Copy link
Owner

@sundb sundb commented Mar 18, 2026

No description provided.

antirez and others added 4 commits January 4, 2026 22:55
The fast_float dependency required C++ (libstdc++) to build Redis.
This commit replaces the 3800-line C++ template library with a minimal
pure C implementation (~260 lines) that provides the same functionality
needed by Redis.

The C implementation uses:
1. Fast path (Clinger's algorithm) for numbers with mantissa <= 2^53
   and exponent in [-22, 22], covering ~99% of real-world cases.
2. Fallback to strtod() for complex cases to ensure correctly-rounded
   results.

Changes:
- New deps/fast_float/fast_float_strtod.c (C implementation)
- Updated deps/fast_float/Makefile (compile C instead of C++)
- Removed deps/fast_float/fast_float.h (C++ library)
- Removed deps/fast_float/fast_float_strtod.cpp (C++ wrapper)
- Removed -lstdc++ from src/Makefile FINAL_LIBS

The implementation was tested against both strtod and the original C++
implementation with 10,000+ test cases including edge cases, special
values (inf/nan), and random inputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants