#decimal #printing #format #functions #itoa #faster #integers

itoap

Even faster functions for printing integers with decimal format

3 releases

0.1.3 Jan 7, 2021
0.1.2 Dec 31, 2020
0.1.1 Jul 24, 2020
0.1.0 Jul 8, 2020
Download history 37/week @ 2020-10-02 18/week @ 2020-10-09 24/week @ 2020-10-16 9/week @ 2020-10-23 11/week @ 2020-10-30 24/week @ 2020-11-06 17/week @ 2020-11-13 30/week @ 2020-11-20 40/week @ 2020-11-27 37/week @ 2020-12-04 126/week @ 2020-12-11 153/week @ 2020-12-18 88/week @ 2020-12-25 287/week @ 2021-01-01 173/week @ 2021-01-08 63/week @ 2021-01-15

277 downloads per month
Used in sailfish

MIT license

94KB
666 lines

Welcome to itoap 👋

Version docs Tests codecov License: MIT

This crate provides even faster functions for printing integers with default format than itoa crate.

Comparison with itoa crate

If 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, but itoap outputs slightly larger binary.

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 result

Benchmark result

Author

👤 Ryohei Machida

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2014-2016 Milo Yip, 2020 Ryohei Machida.

This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

No runtime deps