dqab0824 2015-08-18 02:13
浏览 736
已采纳

Windows中,golang速度很慢[关闭]

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条回答 默认 最新

  • dongsi1954 2015-08-18 02:55
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?