logoalt Hacker News

Go Experiments Explained

73 pointsby ingvelast Monday at 8:39 AM20 commentsview on HN

Comments

nasretdinovtoday at 7:25 AM

I'm really looking forward to SIMD becoming standard in Go. It might sound very niche, however SIMD intrinsics (which is different from how they are available now, which is via non-inlinable assembly) allow to generate similar vector code to C intrinsics, with very little in terms of overhead due to bounds checking, etc. This allows to write programs that are highly optimised for modern CPU and get maybe 80% of performance compared to the same variant in C. This is much better than the current state where C typically outperforms Go by at least 2x/3x, and SIMD typically allows you to get 10x or more speedup already, which gives UNLIMITED POWER to Go when CPU performance is a bottleneck

klodolphtoday at 11:38 AM

I’m leaving JSONv2 enabled and writing my JSON code to use that API directly.

From what I understand, it’s not default because there are performance regressions in some edge cases. But the typical performance is much better and the API is also much better.

To anyone writing new code that does anything with JSON—turn it on. Use it. I think it will be on by default soon enough anyway (1.27).

losthobbiestoday at 9:40 AM

I bought Alex's "Let's Go Further" book a while back, I really should spend some time with it.

I want to learn Go.

ktpsnstoday at 5:54 AM

I find the arena experiment very interesting. If done right, whole programs can be structured as as a set of arenas. I've read some things on arenas here such as https://news.ycombinator.com/item?id=37670740

show 2 replies
jiehongtoday at 7:08 AM

Perhaps the Go community should take a look at JEP or PEP to better document features and their life cycles and statuses overall.

show 2 replies
yjftsjthsd-htoday at 5:02 AM

So, these are feature flags by any name, right?

show 1 reply
verdvermtoday at 8:04 AM

CUE, originally starting as a fork of Go, has the experiments capability too and even extended it to per-file scoping. This makes trying out changes like `try { a: b?.c }` in isolation really nice

Go remains my favorite language for the tooling alone (while not forgetting about so many other great features)