Every few weeks someone posts a graph showing that C++ is 50x faster than Python because they wrote a program that counts to 1000000000. This is then presented as a profound statement about programming languages rather than what it actually is: a measurement of how fast two runtimes execute a completely useless loop
The first problem is that the benchmark is usually measuring something other than what the author thinks it is measuring. Python is mostly paying interpreter overhead. C++ is mostly showing off compiler optimizations. In many cases the compiler can look at the loop, realize it accomplishes nothing, and replace your billion iteration masterpiece with effectively no code at all.
The second problem is that nobody is paid to count to a billion. I mean at least 99.99% of the people ( I am looking at you, op)
real programs spend time waiting for db calls, parsing json, reading files, allocating memory, talking to networks, decompressing data, rendering frames, or doing actual computation. A benchmark that does none of these things tells us approximately nothing about how those programs will behave.
This leaves a bigger impact on someone who is new to engineering and this stuff. They will see this post and go - "Oh wow python is trash"
The question is never "how fast is C++?" The question is "how fast is C++ at what?" Performance is a property of a workload, not a programming language. Once you remove the workload from the discussion, all you're left with is benchmark theater and a graph optimized for engagement.
If your benchmark doesn't resemble any real problem anyone actually has, you're not measuring performance. You're measuring how creatively you can waste a CPU's time (:
Requesting @cmuratori to take inspiration from @rfleury and bless us with delete your accounts on these stupid posts.
In Indonesia there’s a local version of “Twilight” and “Teen Wolf” — a TV series called “Tiger Man”
It follows a schoolboy who, on his 17th birthday, discovers he can transform into a tiger-human hybrid.
From there he has to uncover the mystery of his origin, face rival clans of lion-people, and protect the girl he loves.
Eu não aguento a criatividade do brasileiro!
KkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKkkkkkkkkkkkkKk
@madeinbajor É só vcs transformarem isso em algo não constrangedor pra ambos. Falem que são Mortícia e Gomez, que o baixinho manda bem, que ele gosta de mulher alta msm, sei lá... As pessoas sentem os pontos fracos e miram neles mesmo, ressignifiquem isso