3 ms·
This is fair but performant data processing in Go simply has much lower performance ceiling than Rust, C#, Swift or C++. Which is why all standard library routi
by neonsunset 2y ago
This is fair but performant data processing in Go simply has much lower performance ceiling than Rust, C#, Swift or C++. Which is why all standard library routines that do so (text search, hashing, encryption, etc.) are written in Go's custom """portable""" ASM dialect. It is unwieldy and has API omissions because it takes this half-assed approach many things in Golang ecosystem do.
The closer, and better, example is hand-optimized C# where you still (mostly) write portable and generic code for SIMD routines and they get compiled to almost the same codegen as hand-intrinsified C++.
I understand where this belief comes from, but the industry at large does itself a huge disservice by tunnel visioning at a handful of (mostly subpar) technologies.
- Thaxll 2y agoI think you over hype c# and swift, we did benchmark a grpc api server in c# ( net core ) and Go, same implementation in both languages and Go while faster was using way less memory.
- neonsunset 2y agoWas that with .NET 8? There have been significant performance improvements with each subsequent version in the last 5 years.
- kbolino 2y agoUnfortunately, you are right that SIMD support in Go isn't great and basically requires writing platform-specific code in their quirky assembly language or using a third-party library which does that for you. I don't think the existing use of assembly under the hood to accelerate performance when possible is something to be frowned upon though. It's an implementation detail that almost never matters. One issue with the performance of their assembly code though is that it passes arguments and return values on the stack. I saw something about allowing code to use registers instead but I don't think it's available yet.
- meling 2y agoSupport for register-based calling convention was added in go 1.17 and 1.18. https://go.dev/doc/go1.17#compiler https://go.dev/doc/go1.17#compiler https://go.dev/doc/go1.18#compiler https://go.dev/doc/go1.18#compiler https://go.googlesource.com/proposal/+/master/design/40724-register-calling.md https://go.googlesource.com/proposal/+/master/design/40724-r...