| Crates.io | itoap |
| lib.rs | itoap |
| version | 1.0.1 |
| created_at | 2020-07-08 13:09:24.207712+00 |
| updated_at | 2021-02-18 16:50:27.920486+00 |
| description | Even faster functions for printing integers with decimal format |
| homepage | https://github.com/Kogia-sima/itoap |
| repository | https://github.com/Kogia-sima/itoap |
| max_upload_size | |
| id | 262545 |
| size | 116,806 |
This crate provides even faster functions for printing integers with default format than itoa crate.
itoa crateIf you want to write integers in decimal format to String, Vec or any other
contiguous buffer, then this crate is the best choice.
If you want to write integers to a std::io::Write or std::fmt::Write,
itoa crate and itoap crate shows almost same
performance for some types, but itoap is generally faster.
The implementation is based on the sse2 algorithm from
itoa-benchmark repository.
While itoa crate writes integers from last digits, this algorithm writes
from first digits. It allows integers to be written directly to the buffer.
That's why itoap is faster than itoa.
Benchmark program was executed under the following environment:
| Hardware/Software | Version |
|---|---|
| CPU model name | Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz |
| CPU micro architecture | Sky Lake |
| Standard libc implementation | glibc 2.31.0 |
| rustc | 1.51.0-nightly (368275062 2021-02-02) |

:warning: performance of itoa crate highly depends on the CPU architecture and libc implementation.
👤 Ryohei Machida
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2014-2016 Milo Yip, 2020 Ryohei Machida.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator