Comments (1)
Our API is more extensible, it allows for unchecked write, truncating write, it never panicks in release builds.
There is no_std, serde and diesel integration where arrayvec has no_std and serde erroring (we truncate if the string is bigger, but this is debatable - we could make a Truncate newtype that truncates by default while the regular integration returns a error, or something like that).
Our approach to generics is a bit different, and we support any size from 1 byte to 255 bytes.
I've also benchmarked and this is the comparison (check the benches folder to analyze the micro benchmark). It's basically the same, but our implementation seems a bit faster (but it could be noise).
small-string (23 bytes) clone 4.837 ns
small-string (23 bytes) try_from_str 13.552 ns
small-string (23 bytes) from_str_truncate 11.360 ns
small-string (23 bytes) from_str_unchecked 11.291 ns
small-string (23 bytes) try_push_str 1.162 ns
small-string (23 bytes) push_str 3.490 ns
small-string (23 bytes) push_str_unchecked 1.098 ns
-------------------------------------------------------------
arrayvec string (21 bytes) clone 7.725 ns
arrayvec string (21 bytes) from 14.794 ns
arrayvec string (21 bytes) push str 1.363 ns
from arraystring.
Related Issues (7)
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 arraystring.