Compile Go programs 7x faster
github.com
github.com
To the author, I'm not complaining that you have this on github per se, but you may want to make it more clear what's going on here if you're going to submit it to HN. For instance, this is one of those projects where you could literally inline the source into the README.md. And I'd drop the benchmarks, those really aren't useful. Or at least drop the "x times faster" column.
While I again want to emphasize I'm not really being that critical of the author for creating it, because people are welcome to put whatever they want on github, it's a thin piece of content whose thin content is also somewhat misleading, that was upvoted to the top of HN. I'm still comfortable with this, barring the admin staff disagreeing with me.
This is a great shortcut for something that I've been doing manually for years and I'm happy to have stumbled on it and the surrounding discussion. Please don't flag stories like this.
You could also explain in detail what goes on behind the scenes in an incremental build.
go build builds everything, whereas go install does an incremental build on the stuff that has changed and installs it (either in GOPATH/bin or GOPATH/pkg).
Shouldn't "go build" just do incremental builds and be faster across the board?
guilty. typing in "go run" for quick scripts is one hard to conquer habit ;)
Apparently there are some optimizations coming up on newer versions.
https://talks.golang.org/2012/splash.article
So I am wondering too what this is all about.
Source: https://www.youtube.com/watch?v=WxyyJyB_Ssc
That would be a slowdown of like 4x to current javac, I guess his computer is just not good enough?
Edit - this blogpost has a 18k lines/s though, I wonder what the differences are?
http://ptspts.blogspot.co.uk/2009/11/how-fast-does-8g-in-goo...
Perhaps it's compiling a lot more lines than I think? Lots of bits of the standard library I should be including in the line count?
I rarely use `go build`. `go install` always faster.
`goinstall` predates the entire `go` tool.