> The compiler now performs significantly more aggressive bounds-check and branch elimination. Notably, it now recognizes transitive relations, so if i<j and j<len(s), it can use these facts to eliminate the bounds check for s[i]. It also understands simple arithmetic such as s[i-10] and can recognize more inductive cases in loops. Furthermore, the compiler now uses bounds information to more aggressively optimize shift operations.
Brad, is this presentation available anywhere else (say, exported to PDF)? Our company blocks all sharing sites, so docs.google.com is no go for me (and I cannot reshare it with my team). Would it be possible for you to drop it on golang.org somewhere?
"Go programs currently compile to one WebAssembly module that includes the Go runtime for goroutine scheduling, garbage collection, maps, etc. As a result, the resulting size is at minimum around 2 MB, or 500 KB compressed."
considering it includes the runtime, this isn't a large file compared to images / videos you find on the web today
And this is temporary. In the future we should be able to both do better size-wise & also to generate multiple WebAssembly output modules, perhaps one per Go package, to enable better (more fine-grained) caching.
I still think it's too big and look forward to size reduction. One of the things I found was also a bit heavy is init with tens of thousands of instructions to initialize the unicode package with those dozens of structs.
Now that the binary size issue has finally come into the spotlight thanks to the WebAssembly, hopefully, embedded devs could benefit from the future efforts of size reduction too.
That sounds to me like the size of Hello World. Start including more and more of the runtime and it’ll get quite a bit bigger, much the same as native Go binaries.
Go does a lot of things right without having to carry legacy mistakes like other languages, it's such a breath of fresh air in a landscape of constant change and competing implementations.
I'm very optimistic that the modules system is another step in the right direction, however long it took to get here.
Thanks everyone working on Go.
> Go 1.11 supports the upcoming OpenBSD 6.4 release. Due to changes in the OpenBSD kernel, older versions of Go will not work on OpenBSD 6.4.
I wonder when Go is planning to stop using the kernel ABI on BSDs and macOS directly - in direct contradiction to stability guarantees (or lack thereof) by those platforms - and start using the appropriate APIs, such as libc. Or is it going to be stuff like this or https://github.com/golang/go/issues/16606 forever? Right now, I stay away from Go partly because of this - it feels like a bad idea to use a software stack that is guaranteed to be broken on future OS releases by design. Especially when that stack is advertised specifically for system programming...
"On macOS and iOS, the runtime now uses libSystem.so instead of calling the kernel directly. This should make Go binaries more compatible with future versions of macOS and iOS."
It's easy to complain about, but I've been using go professionally for 3 years and having a gopath hasn't affected me since I installed it. Obviously it's better to not have the gopath requirement, but it was like 2 min of set up.
Eh, it wasn’t the best, but it was still better than any other language’s equivalent except for Rust’s. In any case, modules have worked wonderfully for me so far.
Modules release is definitely a "we told you so" moment. Depending on outside packages has always bothered me, and kept me from doing more with the language.
bradfitz|7 years ago
https://golang.org/doc/go1.11#performance-compiler
> The compiler now performs significantly more aggressive bounds-check and branch elimination. Notably, it now recognizes transitive relations, so if i<j and j<len(s), it can use these facts to eliminate the bounds check for s[i]. It also understands simple arithmetic such as s[i-10] and can recognize more inductive cases in loops. Furthermore, the compiler now uses bounds information to more aggressively optimize shift operations.
weberc2|7 years ago
bradfitz|7 years ago
https://docs.google.com/presentation/d/1EwuJhEHR5Trr2aXBPQaj...
(See speaker notes for more context)
tandr|7 years ago
Thank you very much!
dlojudice|7 years ago
considering it includes the runtime, this isn't a large file compared to images / videos you find on the web today
bradfitz|7 years ago
kodablah|7 years ago
rounce|7 years ago
e3b0c|7 years ago
xienze|7 years ago
MatthewPhillips|7 years ago
adamnemecek|7 years ago
gaddferreira|7 years ago
I'm very optimistic that the modules system is another step in the right direction, however long it took to get here. Thanks everyone working on Go.
unknown|7 years ago
[deleted]
0xmohit|7 years ago
Information about modules can be found at:
- https://golang.org/cmd/go/#hdr-Preliminary_module_support
- https://github.com/golang/go/wiki/Modules
- https://research.swtch.com/vgo
The wiki - https://golang.org/wiki/WebAssembly - provides information on how to get started with using Wasm with Go.
otagaram|7 years ago
[0] https://roberto.selbach.ca/intro-to-go-modules/
int_19h|7 years ago
I wonder when Go is planning to stop using the kernel ABI on BSDs and macOS directly - in direct contradiction to stability guarantees (or lack thereof) by those platforms - and start using the appropriate APIs, such as libc. Or is it going to be stuff like this or https://github.com/golang/go/issues/16606 forever? Right now, I stay away from Go partly because of this - it feels like a bad idea to use a software stack that is guaranteed to be broken on future OS releases by design. Especially when that stack is advertised specifically for system programming...
mseepgood|7 years ago
"On macOS and iOS, the runtime now uses libSystem.so instead of calling the kernel directly. This should make Go binaries more compatible with future versions of macOS and iOS."
alexandernst|7 years ago
ramenmeal|7 years ago
weberc2|7 years ago
lsllc|7 years ago
Most exciting thing [which isn't really a thing] is that they've reserved RISC-V GOARCH values!!!!!!!!!!!! Looking forward to RISC-V everywhere!
unknown|7 years ago
[deleted]
Sileni|7 years ago
mathnode|7 years ago
https://golang.org/doc/go1.11
Thanks everyone at golang.
sctb|7 years ago