6 ms·
Go 1.6 GC improvements
- ascii_lover 11y agoIs there a way to have docs.google.com serve up plain text?
- NightMKoder 11y agoLooks like there is. Given https://docs.google.com/document/d/1kBx98ulj5V5M9Zdeamy7v6ofZXX3yPziAf0V27A64Mo/preview https://docs.google.com/document/d/1kBx98ulj5V5M9Zdeamy7v6of... change "preview" to "export?format=txt": https://docs.google.com/document/d/1kBx98ulj5V5M9Zdeamy7v6ofZXX3yPziAf0V27A64Mo/export?format=txt https://docs.google.com/document/d/1kBx98ulj5V5M9Zdeamy7v6of...
- tedunangst 11y agoA+++ for the second link. Would read again.
- sitharus 11y agoI feel like sharing google docs links is the new emailing a Word document. I'm sure loading a static HTML page faster for the features needed.
- tedunangst 11y agoThe best part is that if you read it on iPhone, every two minutes it switches tasks to the App Store trying to get you to download the app. Not once, not twice, repeatedly.
- eliben 11y agoExcept that it lets you export to TXT if you want. And open it from almost any device. And is much less likely to get your computer infected with something nasty
- sitharus 11y agooh it's much better than Word, but still a paged document format on an infinite canvas.
- TheHippo 11y agoI think they use this for internal planning. I saw this a few hours ago with not all issues from the bottom of the page crossed out. This is more a "let's open our internal communication" thing than a final documentation for end users.
- enahs-sf 11y agoI feel guilty as I haven't even upgraded to go 1.5 yet.
- zac1944 11y agoi will wait 1.6 too.
- nindalf 11y agoYou're missing out, to be honest. Moving to Go 1.5 is painless and the latency wins are huge.
- pkroll 11y agoWell, like landr0id says it's not "stable" yet... although it's on release candidate 1, so it's pretty close. Once 1.5 stable comes out it'd be silly to wait for 1.6, 'cause that's 6 months away.
- landr0id 11y agoYou shouldn't. 1.5 stable hasn't been released yet.
- deleted 11y ago[deleted]
- twotwotwo 11y agoIt looks like a few things in there could further reduce typical and peak pause times, by backgrounding more phases of the work and rescanning stacks late so it's less likely much marking has to happen in the pause. I'm less clear on this, but "embrace write barrier during scan" and the other pacing changes might also better spread out work during the concurrent phases. The pause improvements in 1.5 are no joke -- here's a benchmark from the GopherCon talk on it: http://i.stack.imgur.com/4TOux.png http://i.stack.imgur.com/4TOux.png (1.5 is the yellow dots along the bottom) (That talk is https://www.youtube.com/watch?v=aiv1JOfMjm0 https://www.youtube.com/watch?v=aiv1JOfMjm0 and the slides are https://talks.golang.org/2015/go-gc.pdf https://talks.golang.org/2015/go-gc.pdf ) And here's a graph from a real-world memory hungry app on a beta--300ms pause down to 4ms: https://twitter.com/mkevac/status/620872308446625792/photo/1 https://twitter.com/mkevac/status/620872308446625792/photo/1 (Presentation on that app here: http://www.slideshare.net/MarkoKevac/markogoinbadoo http://www.slideshare.net/MarkoKevac/markogoinbadoo ) Another app's pauses went from ~12ms to ~2ms: https://twitter.com/inconshreveable/status/620650786662555648/photo/1 https://twitter.com/inconshreveable/status/62065078666255564... And this doc means Go isn't moving to a generational GC now, which the pre-1.4 proposal speculated they might do in 1.6. That would mostly be a throughput win (discard short-lived garbage cheaply and early, so full GCs can be rarer), not a pause win (it could add new short pauses for young-gen GCs). Seems sane for now, since the polish they're talking about seems difficult, directly useful, and important as a basis for future work, and the pauses seem like the larger headache for the working Gopher anyway.
- tedunangst 11y agoI've wondered for a while how much go could benefit from better escape analysis. Especially if they don't do generational. Intuitively, it seems quite some escapes are only returned to the caller, then lost. If the compiler rewrote those functions as operating on references to caller provided memory (on the stack), it could reduce transient garbage.
- twotwotwo 11y agoSo, watching https://twitter.com/golang_cls https://twitter.com/golang_cls, some escape-analysis and general garbage-prevention stuff landed (much from, or with the involvement of, the always-amazing Dmitry Vyukov). Maps don't always escape now, for example: https://go-review.googlesource.com/#/c/3508/ https://go-review.googlesource.com/#/c/3508/ Code was added to recognize that some ops don't cause escaping: https://go-review.googlesource.com/#/c/3031/ https://go-review.googlesource.com/#/c/3031/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/3162/ https://go-review.googlesource.com/#/c/3162/ dvyukov wrote about some potential improvements and linked to issues in Feb: https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpTe5q32QDmz8l0BouG0Cw/edit# https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpT... I think I saw even string bytes can be stack-allocated sometimes now, but couldn't immediately find the CL. It looks like this is one of those things where one just has to chip away at cases. Movement happening; just a ton of round tuits required.
- namelezz 11y agoAnyone knows when Go is going to have generics.
- recentdarkness 11y agoThis SO question covers this question quite well: http://stackoverflow.com/questions/3912089/why-no-generics-in-go/3912095#3912095 http://stackoverflow.com/questions/3912089/why-no-generics-i... Beside the accepted answer, there are also some other useful answers included.
- TheMagicHorsey 11y agoI have a question that maybe doesn't belong here. I know people have asked a lot of questions about Go in a skeptical way, and I promise I'm not coming at it from that angle. I actually use Go quite a bit (mostly on App Engine) so I do like it. My question is, given all the things being built around Go, like Kubernetes and various other job and cluster management tools, why weren't those things absorbed into the language or standard library. The way, say it is with Erlang? In Erlang a lot of the multi-machine coordination work seems to be really well thought out, and its part of their standard OTP library ... which seems pretty mature (at least to someone who is a novice like me). Why doesn't Google use Erlang? And if they don't use Erlang, why isn't there some sort of cluster management stuff built into Go? I mean things like cross machine channels, automatic go-routine (or process) restart on failure, process monitoring, etc.
- hariharan_uno 11y agoI think in the beginnning, there was some effort to have channels communicate over a network. But it didn't turn out easy / performant. Also, if they are absorbed into the standard library, I think their iteration speed is restricted because of compatibility requirements.
- pjmlp 11y ago> Why doesn't Google use Erlang? And if they don't use Erlang, why isn't there some sort of cluster management stuff built into Go? Because it requires a higher skill level than Go, which isn't what Google is after. Check Rob Pike's talk about it.
- Gepsens 11y agoHigher skill needed ? I don't think so, I think it's more about the fact that Erlang code is verbose and unreadable.
- jlouis 11y agoGoogle needs a platform they control. They don't control the Erlang ecosystem, and they have learned the hard way how that fares (Java+Oracle+Android). The other problem is that Google needs to build tooling that fits into their existing code base. In this case Java, C++, Python, Javascript and so on. They had to build everything from scratch anyway for Go or Erlang had they chosen either. A lot of the nice things Erlang provide is already in place in the Google infrastructure. So you are aiming at small services which are isolated. This is a place Go has an easy way of getting going. Of course, language familiarity also plays a large role. Go is pretty easy to onboard if you have decent Java or C++ knowledge. Erlang requires you to rethink the way you handle computation. Granted, the long-term benefits in productivity you gain in Erlang is significant[0], but adding more developers to a project is easy for Google. [0] Whenever I write Go, I get frustrated at how much I have to write to do even the basic data munging. In Erlang, this has far better flow.