Live data from Hacker News

Go 1.9 is released

blog.golang.org

21–30 of 131 posts

Re: Go 1.9 is released

#21

Nice can't wait to run some of our benchmarks against this. Go has the awesome property of always becoming a little bit faster every release. It's like your code becomes better without doing anything. Love it :)

This is what they mentioned in 2015. See slide 3 in this pdf: https://talks.golang.org/2015/go-gc.pdf

Re: Go 1.9 is released

#22
In case someone cares about these things, I compared the build times and the binary sizes for 1.9 vs 1.8.3 using the open source project we maintain [1]. This is on a 6-core i7-5280K:

Build time with 1.8.3:

   real	0m7.533s
   user	0m36.913s
   sys	0m2.856s

Build time with 1.9:

   real	0m6.830s
   user	0m35.082s
   sys	0m2.384s

Binary size:

   1.8.3 : 19929736 bytes
   1.9   : 20004424 bytes

So... looks like the multi-threaded compilation indeed delivers better build times, but the binary size has increased slightly.

[1] You can git-clone and try yourself: https://github.com/gravitational/teleport

Re: Go 1.9 is released

#23
post #16

I was looking forward to the fix for the dreaded Linux namespace handling problem: https://www.weave.works/blog/linux-namespaces-and-go-don-t-m... which kind of makes Go suck for many important container-related tasks. But apparently the effort has stalled... https://go-review.googlesource.com/c/go/+/46033

There really aren't great solutions to this in C/C++ having one application share state/memory across namespaces/users is a v hard problem

Re: Go 1.9 is released

#24
post #2

I am looking forward to 1. runtime/pprof package now include symbol information 2. Concurrent Map 3. Profiler Labels 4. database/sql reuse of cached statements 5. The os package now uses the internal runtime poller for file I/O.

> 4. database/sql reuse of cached statements !! that wasn't a thing until now?

You could do it manually but it want automatic.

Re: Go 1.9 is released

#26
post #7

Does anyone know of compile-time benchmarks spanning 1.4 through 1.9, along the lines of [1]? I see there's (more) parallel compilation in 1.9 - so that should improve elapsed time (but not reduce cpu time) of compilation. Would be nice to know if 1.9 is (still) on track catch up to/pass 1.4. [1] https://dave.cheney.net/2016/11/19/go-1-8-toolchain-improvem...

I was curious so I downloaded Go 1.4, and tested against 1.9 on an old version of a project I have (backend for Mafia Watch), about 30K lines of Go, including a few 3rd party dependencies.

Go 1.4: Around 2.1s Go 1.9: Around 2.5s

So within 20% of 1.4, not bad. That's on an old MacBook Air, dual core 1.7 GHz i7, 8GB ram.

And of course the binary performance and GC pause times w/ 1.9 will be much better.

Here's the raw times: https://pastebin.com/ULDHPmVu

Two awesome things:

It was super-easy and fast to download and compile Go 1.4

It was completely painless to compile my old code with Go 1.9

I fucking love how nice it is to work with the Go ecosystem. <3

Re: Go 1.9 is released

#27

So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?

It could just be one map shared by many goroutines, which normally causes a panic: fatal error: concurrent map writes

Standard practice is to use a mutex to guard against concurrent usage.

Re: Go 1.9 is released

#28

Please remember that sync.Map isn't type safe and is more optimised for reads.

interface{} and therefore sync.Map is type safe.

https://en.wikipedia.org/wiki/Type_safety

> Type enforcement can be static, catching potential errors at compile time, or dynamic, associating type information with values at run-time and consulting them as needed to detect imminent errors, or a combination of both.

interface{} is type-checked at runtime. It's type-safe because because you can't e.g. fish out an integer out of interface{} value that represents a string. Runtime won't allow it.

You can either extract a string or the runtime will crash if you insist on extracting anything else. Unless you use unsafe package, in which case you explicitly want to skip type-safety.

Re: Go 1.9 is released

#29

In case someone cares about these things, I compared the build times and the binary sizes for 1.9 vs 1.8.3 using the open source project we maintain [1]. This is on a 6-core i7-5280K: Build time with 1.8.3: real 0m7.533s user 0m36.913s sys 0m2.856s Build time with 1.9: real 0m6.830s user 0m35.082s sys 0m2.384s Binary size: 1.8.3 : 19929736 bytes 1.9 : 20004424 bytes So... looks like the multi-threaded compilation ind…

Unless you perform a proper statistical analysis it's unfair to draw a conclusion from a single run.

Furthermore, when I see a second run that's faster than the first one, I immediately wonder if it's the cache being cold for the first run and warm for the second.

While I have your attention, https://zedshaw.com/archive/programmers-need-to-learn-statis... is worth reading.

Post reply on HN