Re:Compile Go programs 7x faster
by bjourne on Wednesday August 10, 2016 @08:30AM
(#12261132)
Maybe I'm daft, but his table says 502 lines in 1.558 seconds. So 322 lines/second. I thought the Go compiler was supposed to be amazingly fast? That is not fast at all.
[ Parent
| on HN ]
This number is not true I guess.
scalac with idomatic Scala code (no Macro's) is at 500-700 loc/sec. (And scalac is considered slow by many people)
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?
I've got a fairly decent machine, 4 years old but it's a 2.3GHz i7 and I've got an SSD. I got about a 1.5s runtime for "go build" on manul too.
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...
Does `go build` use multiple core's?
There's a flag for it, which didn't make a difference (edit - with the new 1.7 compiler it does, but it goes from half that speed to the same figure). Even with a perfect scaling, I'd be about 10x behind a post from 7 years ago.
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?
actually I guess stdlib is compiled, too. But golang before 1.5 was faster to compile.
I just wonder how much difference it would make with multicore's. I mean scala beats down my new Xeon E5-2670 workstation on all threads.