Comments (3)
I like the API in ryu a lot. I would be on board with picking that up here. Please send a PR!
In your use case is it important to use the smallest possible buffer for each integer type or can we just use [u8; 40]
everywhere which fits any primitive integer?
from itoa.
I wouldn't say it is important (bench first and all) but my first thought was just to expose the max size. Other than that it would make it possible to preserve the current internal api which has the explicit per integer sizes so I figured why not do that tiny bit of optimization.
from itoa.
I would go with [u8; 40]
for now even if it means some restructuring internally. If you decide to implement both ways and find measurably better performance from using a smaller buffer for smaller types, then we can go with the faster way.
from itoa.
Related Issues (19)
- Make Rust's `write!` faster HOT 1
- Include LaTeX code for benchmarks chart HOT 1
- itoa::Integer trait bounds HOT 3
- Support other radix HOT 6
- No std example
- i128/u128 now stable, update docs?
- Write rustdoc
- Usage of deprecated mem::uninitialized HOT 1
- Support for prefix/postfixed buffer HOT 1
- 128 max lengths HOT 2
- Support no_std
- Expose API to write to user-provided buffer HOT 2
- `mem::uninitialized` backport HOT 14
- include tests and license for crates.io archive HOT 1
- write directly to provided u8 slice HOT 1
- Provide itoa::fmt to write to fmt::Write
- Return io::Result<usize> instead of io::Result<()>
- Add support for 128-bit integers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from itoa.