Jajaja. Que es esto? Jajaja. Cómo dicen en comentarios… Debes ser un genio. Podrías haber hecho llamadas a system() y hacer echo con traducción de formato… Asi aún sería más lento. Jajaja. Cosas como está le hacen daño a la comunidad. Dedito abajo
It's always important to know what you are benchmarking. here it is unclear. There is the loop, converting an integer to a string, and writing the output to the standard output. And running that in a powershell terminal inside VSCode. Running this exact c++ code minus the timer checks takes 168ms on my little Ser5 minipc running linux over an ssh connection from my linux box. Redirecting to a file takes about 300ms, and redirecting to /dev/null only takes 44ms. The performance of the code, whatever it is doing, is completely overwhelmed by the slowness of your terminal.
If you're wondering about what everyone are complaining – std::endl flushes the buffer. So the flushing is being called every iteration. 100'000 times.
And both tests are io bounded, so these are shit tests anyways.
I learned the C++ language and I passed classes, OOP and pointers, but I am confused and need help or joint work. Is anyone interested? I will be grateful.
std::endl calls stdout's flush, which takes much much much longer than the entire loop combined in c++z. No joke
Has to be rage bait
Use c++ optimizers
C++ people are screaming in comments "optimize this and that in C++ and then compare"
Lol, this is a fair comparison (Idiomatic Golang vs Idiomatic C++)
This comparison does not make sense. Both programs are compiled already. The whole difference between the languages is before and during compilation.
Jajaja. Que es esto? Jajaja. Cómo dicen en comentarios… Debes ser un genio. Podrías haber hecho llamadas a system() y hacer echo con traducción de formato… Asi aún sería más lento. Jajaja. Cosas como está le hacen daño a la comunidad. Dedito abajo
"how'd you know I have never coded in c++ before?"—– this mf
This just proves a brain is more important than the language you write in.
What kind of benchmark is this?lol😂😂😂😂😂😂
Neeeds to be compared with asm
Smartest Programming Influencer:
And you're running windows. It's a crime.
Stupid comparison
It's always important to know what you are benchmarking. here it is unclear. There is the loop, converting an integer to a string, and writing the output to the standard output. And running that in a powershell terminal inside VSCode. Running this exact c++ code minus the timer checks takes 168ms on my little Ser5 minipc running linux over an ssh connection from my linux box. Redirecting to a file takes about 300ms, and redirecting to /dev/null only takes 44ms. The performance of the code, whatever it is doing, is completely overwhelmed by the slowness of your terminal.
Stupid Comparison
bro use goroutine the you can see speed.
From when is logging performance measurement ?
How to tell you do not know about coding and programming languages…
As always, one language has optimised code and the other has some gabage written
std::endl flushes the io buffers, it is an expensive operation
Poorly written C++, that result should be different
When you only know the syntax and don't know the logic behind it and how it works
You suppose to add “when rookie is trying to compare c++ with go”
Use printf when doing lots of prints because you flush the system with each std cout
the code indentation is insane
Oh yeah, another smart programmer out here.
If you're wondering about what everyone are complaining – std::endl flushes the buffer. So the flushing is being called every iteration. 100'000 times.
And both tests are io bounded, so these are shit tests anyways.
You are not flushing at the same interval
they hide the default concurency implementation of threads LOLS
Go is a higher level simpler syntax language with same performance than a lower level language, thats what really sells it off
bro forgot to compile💀
wtf man? you're tested terminal velocity, not Lang. DUMB.
I do the same thing ans I ain't got the same result ; my c++ id faster!! U got to review your complilation options my man…..
Chhheeeeeers….
I learned the C++ language and I passed classes, OOP and pointers, but I am confused and need help or joint work.
Is anyone interested? I will be grateful.
clown
okay….so wheres the end product? only text like something in 80's?