Use index assignment instead of appending to the slice.
Closed this issue · 1 comments
akshaybharambe14 commented
The speed and the allocations can be improved by pre allocating the slice and using index assignment.
muhammadmuzzammil1998 commented
Thanks... Didn't think to benchmark the tests. 😅