Created
January 6, 2019 20:05
-
-
Save josharian/5d1340c2f35e3d78ddbef766acf3b929 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
package p | |
import ( | |
_ "net/http" | |
"testing" | |
_ "unsafe" | |
) | |
//go:linkname _initdone net/http.initdone· | |
var _initdone uint8 | |
//go:linkname _init net/http.init | |
func _init() | |
func BenchmarkInit(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
_initdone = 0 | |
_init() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment