hun*_*tis 4 optimization profiling go
我正在分析一个程序,其中绝大多数 (86%) 的时间都花在两个运行时函数上:kevent 和 selectgo。我理解select,但我不知道kevent是什么(所以我不知道从哪里开始优化):
Showing top 10 nodes out of 33
flat flat% sum% cum cum%
114.63s 65.79% 65.79% 114.63s 65.79% runtime.kevent /usr/local/Cellar/go/1.9.2/libexec/src/runtime/sys_darwin_amd64.s
19.26s 11.05% 76.85% 35.90s 20.60% runtime.selectgo /usr/local/Cellar/go/1.9.2/libexec/src/runtime/select.go