| Age | Commit message (Collapse) | Author |
|
Removed:
std.io.InStream.readUntilDelimiterBuffer
Deprecated:
std.ArrayList.toSlice
std.ArrayList.toSliceConst
std.ArrayList.at
std.ArrayList.ptrAt
std.ArrayList.setOrError
std.ArrayList.set
std.ArrayList.swapRemoveOrError
std.Buffer.toSlice
std.Buffer.toSliceConst
std.io.InStream.readFull => std.io.InStream.readAll
std.io.InStream.readAllBuffer
New:
std.ArrayList.span
std.ArrayList.expandToCapacity
std.Buffer.span
std.io.InStream.readUntilDelimiterArrayList
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
see BRANCH_TODO file
|
|
see #3770
|
|
|
|
Add initCapacity for buffer & arraylist
|
|
and fix the fallout
|
|
Added Buffer.initCapcity() to buffer to allow preallocation of a block of memory to reduce future allocations. Uses the added ArrayList.initCapacity() function to achieve this.
Added Buffer.capacity() to track current usable allocation size, not counting null byte, and returning 0 if empty or created with Buffer.initNull()
Added a test for initCapacity() that shows that no further allocation is performed for an append of size smaller than or equal to capacity when initCapacity is used.
Added a test for initSize(), since it did not exist already.
Also added a comment to better explain the difference between initSize() and initCapacity()
note: forgot in the first commit but thanks to mikdusan for helping me brainstorm, through the process, and for drawing up a draft diff which I tweaked.
|
|
|
|
that's all this commit does. further commits will fix cli flags and
such.
see #2221
|