4 ms·
But even when we say "performance-critical" most of us don't mean getting 3M req/sec from one box like she did w/Haywire We are not all writing web apps. Some
by danieldk 12y ago
But even when we say "performance-critical" most of us don't mean getting 3M req/sec from one box like she did w/Haywire
We are not all writing web apps. Some of use are in machine learning, NLP, signal processing, etc. where squeezing out as much performance as possible does matter.
In those fields Go is still weak. No autovectorization, no OpenMP, no direct CUDA integration, GC overhead, etc. Luckily, this can often be worked around since cgo is so good. One can write performance-intensive parts in C or C++, compile with the latest gcc or clang and link it with the Go code to drive it. This is often an understated advantage of Go compared to Java, where JNI calls are expensive. But the Go camp always advocate for porting everything to Go (because fast compile times).
- howeman 12y agoWhat does OpenMP do for you that Go's built-in concurrency doesn't?
- danieldk 12y agoOpenMP is for parallelisation, not concurrency. OpenMP is designed for embarrassingly parallel loops that you typically encounter in numeric code, where parallelization is as simple as tagging a for loop with a pragma and (if necessary) marking variables that should be synchronized and/or critical sections. E.g. you can make the libsvm library parellalized and scale up to many cores by adding two pragma statements. I have a Go package that attempts to bring some of this functionality to Go [1]. But it's definitely not the same as having OpenMP. [1] http://godoc.org/github.com/danieldk/par http://godoc.org/github.com/danieldk/par
- twotwotwo 12y agoIndeed, we agree that Go is suitable for some things people call high-performance but not others. I do not advocate porting everything to Go. Not only is it not always a good fit, but there's a very high bar to clear to justify revamping any perfectly good codebase. (I use Python at work and wouldn't advocate for porting anything.)