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
{{ message }}
Repository navigation
Manticore\Ds: non-owning subarray views over a shared buffer #272
A Manticore\Ds\ByteBuffer slice today is a copy (toString($offset, $length)). Code that carves a packet into fields and hands each to a callee pays an allocation and a copy per field.
Proposal
Non-owning subarray views over a shared buffer: $buf->view($offset, $length) returning a typed array that reads and writes through to the parent's bytes. Needs a lifetime rule (the view keeps the parent buffer alive) and a decision on parent growth (setSize / push reallocates the data pointer).
Status
No consumer in the repo. prelude/websocket.php and Http\ use Buffer\ByteBuffer (string + cursor), a different class, and the payload leaves the parser as a string anyway. The measurable cost on that path is applyMask, tracked separately. Build this when a concrete parser needs it.
Activity