For me, a `newSeq[int]()` takes about 23 nanoseconds and a 
`newSeqOfCap[int](128)` takes about 90 nanoseconds (2.5 GHz Intel Core i7), 
including the time for garbage collection, averaged over 100,000,000 
allocations.

This sounds about right. You have some unavoidable costs doing the allocation 
proper, and then for `newSeqOfCap[int](128)`, you have to also initialize about 
1K of additional memory.

Reply via email to