You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reddit user nwydopoints out that prost doesn't do as good of a job reusing deeply nested message allocations as the reference C++ implementation, due to differences between Vec and RepeatedPtrField. While I think this isn't necessarily as critical for prost since nested message fields are inline (which often has the effect of flattening the hierarchy), it could be significant for encoding/decoding n-ary tree-like structures. Should be relatively easy to write a benchmark for it.
One possible solution is to add a clear+merge all-in-one operation to Message (perhaps called Message::decode_into), which could re-use existing deeply nested allocations.
The text was updated successfully, but these errors were encountered:
Reddit user
nwydo
points out thatprost
doesn't do as good of a job reusing deeply nested message allocations as the reference C++ implementation, due to differences betweenVec
andRepeatedPtrField
. While I think this isn't necessarily as critical forprost
since nested message fields are inline (which often has the effect of flattening the hierarchy), it could be significant for encoding/decoding n-ary tree-like structures. Should be relatively easy to write a benchmark for it.One possible solution is to add a clear+merge all-in-one operation to
Message
(perhaps calledMessage::decode_into
), which could re-use existing deeply nested allocations.The text was updated successfully, but these errors were encountered: