Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asciphx/itoa
The fastest integer to ASCII. Only the fastest, not faster. WTF?(what the fuck!) Bullshit!
https://github.com/asciphx/itoa
Last synced: about 6 hours ago
JSON representation
The fastest integer to ASCII. Only the fastest, not faster. WTF?(what the fuck!) Bullshit!
- Host: GitHub
- URL: https://github.com/asciphx/itoa
- Owner: asciphx
- License: agpl-3.0
- Created: 2023-02-10T17:23:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-31T01:21:44.000Z (10 months ago)
- Last Synced: 2023-12-31T23:29:59.552Z (10 months ago)
- Language: C
- Homepage:
- Size: 151 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-zh_CN.md
- License: LICENSE
Awesome Lists containing this project
README
# itoa
宇宙中最快的整数到ASCII字符的转换。支持C++11。i2a.h - 编程接口, c版本的头文件
i2a.c - c版本的源文件
i2a.hpp - C++版本的头文件## 构建 (测试)
建议使用CMake进行源代码外构建。
```
mkdir build
cd build
cmake ..
cd ..
cmake --build ./build --config Release
./test```
## 特征
- 无需高版本的c++, 性能会有约100%的提升
- 头文件与源文件分离, 无需过多的内联, 防止编译缓慢
- ![测试](./test.jpg)## 说明
- C++版本详见[https://gitee.com/asciphx/Nod/blob/main/fc/include/hpp/i2a.hpp](https://gitee.com/asciphx/Nod/blob/main/fc/include/hpp/i2a.hpp)## 详情(c++版本, Linux)
预测, 综合性能对比SSE大概如下|Function |Time (ns)|Speedup|
|---------|--------:|------:|
|sse2 | 7.614| 25.51x|
|i2a | 3.685| 53.15x|
|null | 2.230| 87.09x|