Anonymous
i need some youtube meme vim
Emacs can't run Youtube
klimi
hm
klimi
it can actually
Anonymous
it can actually
Yeah, but I am too lazy to set it up
klimi
yep
Mat
Oh ok, so only those parts matter where C++ is doing better :)
Are you comparing C and C++ using printf and cout?
Mat
Holly C++
Are you using endl or "\n"?
Marie
std :: endl;
https://m.youtube.com/watch?v=6WeEMlmrfOI https://m.youtube.com/watch?v=GMqQOEZYVJQ
Anonymous
Are you comparing C and C++ using printf and cout?
Well, otherwise no reason to compre
Ибраги́м
Apart if your system have far and short pointers
This supposed to be nonexistent before Maxi's arrival to this world, right?
Jussi
\n doesnt flush the output always afaik
Mat
Compare C and C++ on a real programme, not hello world... and it's not only a matter of execution speed
BinaryByter
Holly C++
complain to gcc, this should NOT be possible according to stroustrupp (remove the endl though)
BinaryByter
Yet @linuxer4fun told us many times that c++ compilers are the future
shhh may I tell you a secret? cout and printf work differently.
Anonymous
complain to gcc, this should NOT be possible according to stroustrupp (remove the endl though)
I use clang, which generates friendly error messages in cost of extra stuffs
BinaryByter
the same C++ compiler
BinaryByter
will you please grow up and stop being a stupid guy who sees a black thing and instantly cries "elefant"?
Ludovic 'Archivist'
Ludovic 'Archivist'
Holly C++
And the equivalent C code should as mentioned use flush() too
Anonymous
Ludovic 'Archivist'
Still generates too much stuff I guess
Mostly initialization information
BinaryByter
Anonymous
Ludovic 'Archivist'
Still generates too much stuff I guess
The second part is the atexit handler to print if it crashed with a known error
Anonymous
The second part is the atexit handler to print if it crashed with a known error
It's like "Let me hold your hand in case you screw up kid?"
Anonymous
I maybe wrong though
Ludovic 'Archivist'
But it is useful on non embedded platforms
Anonymous
You can disable it easily
How to generate very less footprint via c++ ?
Ludovic 'Archivist'
Anonymous
-0s -no-rtti are a start
what exactly that flag means?
Ludovic 'Archivist'
First means minimize code size, second disable runtime type information
BinaryByter
-0s -no-rtti are a start
it's -fno-rtti btw
klimi
hi
Ludovic 'Archivist'
klimi
LUdoooo
klimi
こんばんは
Ludovic 'Archivist'
こんばんは
こんばんはクリミくん
klimi
こんばんはクリミくん
天気は厚い出羽ありませんか
Anonymous
it's -fno-rtti btw
seems not working?
BinaryByter
seems not working?
it's better than the initial one
BinaryByter
add -0s
Anonymous
it's better than the initial one
what? Can I stript it more?
Ибраги́м
Oh ok, so only those parts matter where C++ is doing better :)
Have u seen fmtlib? I still stand by my line: when there's a usable C++ compiler, no reason for me to use C.
BinaryByter
what? Can I stript it more?
ignore all the ones that start with a . btw
Ludovic 'Archivist'
seems not working?
Also, it will not remove metadata, this is to be removed by stripping the binary
BinaryByter
they are just informations for the assembler
Anonymous
add -0s
Now it's like this
Anonymous
I am sure there might be a way to strip into this level
BinaryByter
let godbolt strip for ya
Ибраги́м
Pure C++ level optimization right here
std::cout. Go check fmtlib
Ибраги́м
fmt::print vs std::cout
Ибраги́м
Ибраги́м
Anonymous
Yeah, this is what I wanted
Anonymous
Thanks :)
Ибраги́м
Thanks :)
Playground: https://gcc.godbolt.org/z/GwqL9K
Anonymous
There might be some limitations I guess
Anonymous
Playground: https://gcc.godbolt.org/z/GwqL9K
Good good, this is what I wanted
Ибраги́м
To be fair to C, printf does this in 10 instructions but u gain the ability to eaily blow up yourself with no point of return.
BinaryByter
it's like at school
Anonymous
no
Yes
BinaryByter
you are thaught pseudo-wrong stuff
BinaryByter
that somehow works
BinaryByter
but in the end it just ingrains bad habits
Anonymous
I like risky life xD
Anonymous
Full of thrill xD
Ибраги́м