mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-12 13:19:54 +08:00
Update README.md
This commit is contained in:
parent
3155d379ce
commit
dc46ad4c60
@ -53,12 +53,16 @@ int main() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Like the C++17 standard, the `fast_float::from_chars` functions take an optional last argument of
|
Like the C++17 standard, the `fast_float::from_chars` functions take an optional last argument of
|
||||||
the type `fast_float::chars_format`. It is a bitset value: we check whether
|
the type `fast_float::chars_format`. It is a bitset value: we check whether
|
||||||
`fmt & fast_float::chars_format::fixed` and `fmt & fast_float::chars_format::scientific` are set
|
`fmt & fast_float::chars_format::fixed` and `fmt & fast_float::chars_format::scientific` are set
|
||||||
to determine whether we allow the fixed point and scientific notation respectively.
|
to determine whether we allow the fixed point and scientific notation respectively.
|
||||||
The default is `fast_float::chars_format::general` which allows both `fixed` and `scientific`.
|
The default is `fast_float::chars_format::general` which allows both `fixed` and `scientific`.
|
||||||
|
|
||||||
|
We support Visual Studio, macOS, Linux, freeBSD.
|
||||||
|
|
||||||
|
|
||||||
## How fast is it?
|
## How fast is it?
|
||||||
|
|
||||||
It can parse random floating-point numbers at a speed of 1 GB/s on some systems. We find that it is often twice as fast as the best available competitor, and many times faster than many standard-library implementations.
|
It can parse random floating-point numbers at a speed of 1 GB/s on some systems. We find that it is often twice as fast as the best available competitor, and many times faster than many standard-library implementations.
|
||||||
@ -72,6 +76,8 @@ abseil : 521.66 MB/s (+/- 3.2 %) 24.86 Min
|
|||||||
fastfloat : 1061.86 MB/s (+/- 3.8 %) 50.61 Mint/s
|
fastfloat : 1061.86 MB/s (+/- 3.8 %) 50.61 Mint/s
|
||||||
```
|
```
|
||||||
|
|
||||||
|
See https://github.com/lemire/simple_fastfloat_benchmark for our benchmarking code.
|
||||||
|
|
||||||
## Using as a CMake dependency
|
## Using as a CMake dependency
|
||||||
|
|
||||||
This library is header-only by design. The CMake file provides the `fast_float` target
|
This library is header-only by design. The CMake file provides the `fast_float` target
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user