v0y4g3r
Re:DeepSeek-v3.2: Pushing the Frontier of Open Large Language Models [...
on Monday December 01, 2025 @05:51PM (#46114548)
You nailed it
Re:Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding...
on Friday April 12, 2024 @09:10AM (#40012259)
WriteRequest::timeseries is a vector (https://github.com/prometheus/prometheus/blob/main/prompb/re...) and
the repeated file `Timeseries::labels` and `Timeseries::samples` are reused across different timeseries. You don't have to alloc a new vector for the lables and samples for each new timeseries instance.
Re:Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding...
on Friday April 12, 2024 @09:01AM (#40012119)
The Go version is not a naive implementation, it's also the well optimized version from VictoriaMetrics.
Re:Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding...
on Friday April 12, 2024 @05:17AM (#40010768)
It's technically `safe` as long as you never access the decoded struct once the original bytes is dropped.
I believe that how `unsafe` works, the programmer, instead of compiler, ensures safety.
Re:Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding...
on Friday April 12, 2024 @05:02AM (#40010662)
I think no. In this particular case it involves how Rust handles lifetimes compared to other languages with garbage collector.
Essentially it's a comparison between reference counting and tracing garbage collection based on reacheability.
Re:Fivefold Slower Compared to Go? Optimizing Rust's Protobuf Decoding...
on Friday April 12, 2024 @04:29AM (#40010495)
FlatBuffers does the trick as a better replacement to ProtoBuf when running in some resource-critical devices. We were working on a project that leverage Arrow IPC (internally FlatBuffers) and shared memory to collect metrics on edge devices with limit CPU and memory, hopefully we can open source it soon.
But in this case the format is defined by [Prometheus](https://github.com/prometheus/prometheus/blob/main/prompb/re...) and we just adopt that.