A
A
AbyssHunt2022-01-17 23:31:26
go
AbyssHunt, 2022-01-17 23:31:26

Golang what's the point?

What's the point of Golang? I thought that it is faster than the same sharp and wins many times, but in practice it is not so.
In the benchmarks https://benchmarksgame-team.pages.debian.net/bench... Go wins only 2 benches, but the benches are still game. Then I decided to look at tehcmepower and Go wins there only in Cached queries, when the same ASP.CORE / NETpractically occupies the top 5 everywhere and at the same time overtakes Go, although Golang was originally conceived as a yap for a highload, but why is it not even that the sharp overtakes it, but its loaded framework? I've been looking at Golang for a long time, but its only plus is goroutines (go func) and simplicity, well, 2-3k rps more. I say right away that this is not a hatred towards the tongue, it’s just sad that Sharpe smacks it. If I'm wrong, can you please describe its strengths and correct me about the benchmarks.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Belyaev, 2022-01-18
@bingo347

Firstly, any benchmark can be written in such a way that visually it will look very similar, but in reality one technology will use its strengths, while the other one will not (it is clear who will win). Moreover, this can be done both on purpose, in order to exalt one of the technologies, or unintentionally, simply because the person who wrote the benchmark knows one technology very well and mediocre another.
For example, I can write many things in C, C# and Go, but I know these languages ​​very superficially, on the other hand I know JS very well (including quite a lot of v8 guts) and Rust, what do you think, who will win, if I start writing benchmarks to compare these 5 languages?

although Golang was originally conceived as a jap for highload
Go was originally conceived as a language that anyone with a basic knowledge of programming could quickly learn, so that Google could hire a thousand juniors and they quickly prototyped ideas without C / C ++ troubles.
And all the super-duper parallelism is actually asynchronous, running on a small pool of real OS threads. Besides, no options. Asynchronous runtime is also not free. On all sorts of I / O pieces, asynchrony shows itself very well, but on purely computational tasks, all its advantages become minuses. Sharpe has control over where to use asynchronous and where to transfer calculations to a real thread. There is no such possibility in Go.
PS But in general, in the real world you will almost never run into the performance of the language, well, unless you stick the most non-optimal algorithms everywhere. In fact, the bottleneck will be the network and disks. And even in purely computational things, you are more likely to run into RAM and processor caches, and not into PL.

V
Vasily Bannikov, 2022-01-18
@vabka

1. Go was invented in Google to solve Google problems long before .net core appeared with all its performance.
2. Go still produces more compact and environment-independent binaries.
3. In order for C# to show results like in techempower, you need to write code the way no one writes it in the real world.
In the backlog. net commands, there are even separate points for being top1 in benchmarks
4. Go is still much easier than Sharpe, because n1

N
nakem, 2022-01-18
@nakem

I used to think in those terms too. It also seemed to me that the coolest technologies are those that take out everyone on benchmarks and praise them on Habra. "Top 5 languages ​​to learn in 2019\20\21\22\23..."
No)) It's not. You can take it as a dogma :)))

S
Stanislav Bodrov, 2022-01-23
@jenki

Assembler is supposedly faster and stronger than everyone else, but thanks to skillful shit-coding on it, the resulting code can be easily hacked by a well-written python script. And it will merge according to terrible benches written to test the sphericity of horses in a hadron vacuum.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question