Friday, May 3, 2024
HomeGolangWhat's the theoretical / sensible restrict of golang vs c / c++?...

What’s the theoretical / sensible restrict of golang vs c / c++? Assertion of Rob on reminiscence communication wants appending – Technical Dialogue


i’m all the time pushing for efficiency of golang and located lots of areas whereby go is slower than c equal at 2x and 1.2x and so forth however questioning what’s the theoretical / sensible restrict of golang. particularly in multi core (448 cpu core) setting and so forth.

i’ve been utilizing utilizing go for the previous 6 years each day and with excessive effectivity consideration solely going for zero alloc stuff however i’m questioning how far am i able to push golang earlier than i have to all the time have a look at c / c++ / rust.

in an “unrelated challenge”, that is my ideas on this assertion:
“Don’t talk by sharing reminiscence, share reminiscence by speaking.” (relevant solely as much as 16 core cpu methods, something greater than that offers you diminishing returns based mostly on how golang does thread scheduling… and so forth.)

any opinion / feedback on the difficulty title? not trolling however i really like golang simply that i’m all the time restricted by the effectivity of it. please dont recommend goasm. i do hope for a zero alloc cgo with out ffi overhead. unsure if this might be made attainable.

C/C++ supply finer-grained management over reminiscence administration and {hardware} interactions, doubtlessly main to higher theoretical efficiency for very particular duties. It is because C/C++ enable for direct manipulation of reminiscence addresses, which Go avoids for security causes.

I believe solely you’ll be able to reply this query for your self. However it SOUNDS like perhaps Rust can be the default for you if efficiency is actually your #1 consideration. I believe Go actually shines within the area of straightforward to learn/keep/take a look at net APIs and CLI apps. You may push efficiency fairly far and there are some giant initiatives like CockroachDB and Caddy which might be giant in scale and performant however I don’t know if it actually is sensible to achieve for a instrument that you realize isn’t 100% ultimate on your activity at hand.

that’s not an excellent comparability. you made golang look tremendous gradual in contrast with java.

I didn’t make Go appear like something in comparison with Java. It’s actually slower within the present implementations of that problem. And if that was your solely takeaway from that article, I’d say that bolsters the concept concept that Go might be not the best answer for you.

It’s spectacular to listen to about your in depth expertise with Go and your dedication to efficiency optimization. Go’s design philosophy makes it a unbelievable alternative for a lot of initiatives, however as you’ve famous, there are situations the place different languages may outshine it. In relation to scalability on methods with a lot of CPU cores, Go’s concurrency mannequin might hit some limitations. Nevertheless, along with your experience and deal with effectivity, you’re already forward of the sport. Hold exploring optimization strategies, and don’t hesitate to dive into different languages in the event that they higher fit your wants. Your dedication to squeezing essentially the most out of Go is inspiring!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments