Skip to content

Instantly share code, notes, and snippets.

@jackc
jackc / slice_cap.go
Created April 14, 2013 00:52
Test to show how slices automatically grow their capacity
package main
import "fmt"
func main() {
int64Slice := make([]int64, 0)
lastCap := -1
for i := 0; i < 65536; i++ {