The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →
Smartstring Alternatives
Similar projects and alternatives to smartstring
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
zig
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
ixy-languages
A high-speed network driver written in C, Rust, C++, Go, C#, Java, OCaml, Haskell, Swift, Javascript, and Python
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
smartstring reviews and mentions
-
Does using "String" instead of "&str" a lot results in unoptimised code?
Your use case sounds like it will involve a lot of small strings that use a subset of UTF-8. If you’re concerned about performance, you could look into something like smartstring. Sixbit also looks interesting, but it looks like it won’t give you any more characters and it’d probably require additional computation to do the conversion (and they’d have to be converted back out).
-
Rust Is Hard, Or: The Misery of Mainstream Programming
> If you have a long-running async function, then pass parameters by value! If you have a polymorphic async function, then return your result in a Box.
I've taken to making heavy use of the smallvec and smartstring crates for this. Most lists and strings are small in practice. Using smallvec / smartstring lets you keep most clone() calls allocation-free. This in turn lets you use owned objects, which are easier to reason about - for you and the borrow checker. And you keep a lot of the performance of just passing around references.
I tried to use async rust a couple of years ago, and fell on my face in the process. Most of my rust at the moment is designed to compile to wasm - and then I'm leaning on nodejs for networking and IO. Writing async networked code is oh so much easier to reason about in javascript. When GAT, TAIT and some other language features to fix async land I'll muster up the courage to make another attempt. But rust's progress at fixing these problems feels painfully slow.
https://crates.io/crates/smallvec / https://crates.io/crates/smartstring
-
GitHub - epage/string-benchmarks-rs: Comparison of Rust string types
Just to point out, smartstring no longer assumes String memory layout. From the changelog:
-
Why is str not just [char]?
There's some really good crates that implement SSO floating around - eg, SmartString. But I agree - its a pity they're needed. Swift built this into the core string type in the language. I think that was the right call.
-
Announcing `compact_str`! A super memory efficient immutable string that is transparently stored on the stack, when possible
Comparatively: * SmolStr can inline up to 22 bytes but does not adjust down for 32-bit architectures, meaning it's potentially wasting memory on 32-bit archs. Similarly though it's immutable and Clone is O(1) * SmartString can inline up to 23 bytes, but it's mutable and Clone is O(n). Also this crate makes assumptions about the memory layout of a String, which in theory should be fine, but is a slight caveat.
-
Version 0.19.15 released.
SmartString is used to store identifiers (which tends to be short, fewer than 23 characters, and ASCII-based) because they can usually be stored inline. Map keys now also use SmartString.
-
Speed of Rust vs. C
I’ve been using smartstrings, which is both excellent and maintained. https://github.com/bodil/smartstring
-
A note from our sponsor - WorkOS
workos.com | 25 Apr 2024
Stats
bodil/smartstring is an open source project licensed under Mozilla Public License 2.0 which is an OSI approved license.
The primary programming language of smartstring is Rust.
Sponsored