golang is slow in Windows [closed]

末鹿安然 提交于 2021-02-08 14:47:06

问题


package main

import "fmt"

func main() {
    fmt.Println("Hello world")
}

The command is go run a.go.
This code need 4~5s in windows.


回答1:


I believe that go run compiles the code and then runs it. Go 1.5 is known to be much slower at compiling. (Read the release notes) The devs have converted it all to Go code but haven't optimized it for Go yet.

Also Go uses POSIX style disk and network operations. I don't believe anyone has optimized Go for completion ports and Windows asynch IO.



来源:https://stackoverflow.com/questions/32062493/golang-is-slow-in-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!