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
We should use a small stack-allocated buffer for the initial stack, then move to heap when we run out of that (which implies a buffer copy, but probably worth it overall? - or maybe we could avoid the copy by treating the heap allocation as "overflow" room)
Ditto for the buffer we decode into? We'll always need at least one allocation, though
per benchmarks https://github.com/DavidBuchanan314/dag-cbor-benchmark we're significantly slower than libipld for very short messages.
This is likely in large part due to the sizeable initial stack allocations we do
dag-cbrrr/src/cbrrr/_cbrrr.c
Lines 483 to 484 in ad56c83
dag-cbrrr/src/cbrrr/_cbrrr.c
Lines 1042 to 1043 in ad56c83
We should use a small stack-allocated buffer for the initial stack, then move to heap when we run out of that (which implies a buffer copy, but probably worth it overall? - or maybe we could avoid the copy by treating the heap allocation as "overflow" room)
Ditto for the buffer we decode into? We'll always need at least one allocation, though
dag-cbrrr/src/cbrrr/_cbrrr.c
Line 1364 in ad56c83
The text was updated successfully, but these errors were encountered: