Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

golang is slow in Windows [closed]

Tags:

go

package main

import "fmt"

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

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

like image 788
Jianjian Yang Avatar asked Aug 18 '15 02:08

Jianjian Yang


1 Answers

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.

like image 171
Zan Lynx Avatar answered Oct 06 '22 15:10

Zan Lynx