-
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.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
> I don’t use nightly Rust, so for now, new_zeroed() won’t work
That's a completely fair observation. The main thing I want stabilised is a single niche for custom types. I would take more if offered but experience says that every extra little thing doubles the discussion time, so, one niche is all I need, and Rust guarantees this exists in some form so even if a later mechanism does - say - fancy non-continuous niches, I just want one value ASAP.
https://github.com/rust-lang/rfcs/pull/3334
> “I want to allocate something large on the heap” and it doesn’t seem like I should need to use nightly builds or unsafe{} to do it.
The former makes sense to me, the latter (a requirement to use unsafe) I can see there can be cases where the compiler has to do a lot of contortions to safely but optimally mint the type in place in the heap and just writing the unsafe case is reasonable. I don't know anything about your type so I can't judge.
Not sure I follow the question exactly and tbh it was like a year ago and I forget the specifics. You are welcome to look at the code, however:
https://github.com/nu11ptr/flexstr/blob/master/flexstr/src/b...
The simplest way to make quick experiments for me is with https://godbolt.org/ .
For a quick example: https://godbolt.org/z/8GvYzYj5h
You can see we're trying to put a 1kB object on heap, but the compiler generates two `memcpy` calls - first to copy it on stack, second to actually copy it onto allocated memory.
In "real programs", you just need to look at the program's assembly. Or even more generally, I originally noticed this when observing the unusually high amount of time spent in some functions when profiling.
Bringing that feature to Rust was under discussion for a while but it was ultimately withdrawn:
https://github.com/rust-lang/rust/issues/27779#issuecomment-...
This crate is marked as deprecated because apparently upstream rust optimises its use-case now, but you never know:
https://github.com/kvark/copyless
Box::alloc().init(make_my_elem())