Created
February 12, 2019 10:01
-
-
Save zhyon404/4911d07880b68ea8bbc5c374bb51f320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m := make(map[[8]byte][]int64, 1e8) | |
for i := 0; i < 10; i++ { | |
start := time.Now() | |
runtime.GC() | |
fmt.Printf("GC took %s\n", time.Since(start)) | |
} | |
runtime.KeepAlive(m) | |
//x := 10 | |
//var mx [x]int | |
//fmt.Println(mx) | |
//m := make(map[int]string) | |
//m[1] = "xxxxx" | |
runtime.GC() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment