-
Notifications
You must be signed in to change notification settings - Fork 57
Description
I'm not a fan of these methods. They hide the cost of the .unwrap()
and Arc
derefs, which we really don't want to be doing in any tight loops like there might be in fn decode_b
. Two solutions are:
-
Most of the data accessed through things like
frame_hdr
are smallCopy
able fields. These we can justCopy
out at the beginning and use directly. For larger fields like arrays, such asgmv
, we can pay the cost there. -
Remove the
frame_hdr
andseq_hdr
fields fromRav1dFrameData
. If&Rav1dFrameData
can be passed all the way down, then I thinkframe_hdr
andseq_hdr
can, and then we can do the.unwrap()
andArc
deref only once at the beginning, and it very nicely untangles things.
See #748 (comment).
However, this is just for perf, and the solution is not exceedingly simple, so we can save it for later.