Anonymous
I see
BinaryByter
Lol
relativity ;)
Anonymous
Generally I've seen c to be faster. I'll try comparing tomorrow in my pc
BinaryByter
Anonymous
Xdddd
BinaryByter
BinaryByter
btw
BinaryByter
recompiling the file as a C program makes it slow down
Anonymous
Wait I'll check it tomorrow
Mihail
struct is slightly faster
only diffrence is the default access-modifier (not sure if this is how i should call it) of it's members
BinaryByter
in C the difference is clear
BinaryByter
one exist the other doesnt
Mihail
in C the difference is clear
c doesn't have classes
BinaryByter
recompiling the file as a C program makes it slow down
wait wrong, I forgot to add the optimization flags to the Gcc command
BinaryByter
with them, both programs are pretty much as fast
Anonymous
This would give syntax errors in c unless you modified it
BinaryByter
what?
Anonymous
.
BinaryByter
i only compiled the second one in C
Anonymous
How can a c program have access specifier 🙄
BinaryByter
dunno, gcc swallowed it
Anonymous
Lol
BinaryByter
oh it's just that gcc the little bastard recognized that I wanted to compile a C++ file
BinaryByter
renaming it spat errors
Mubeen
Hi all, I know basic C++, and advanced Python. Now I want to get deeper into C++, especially in geometric modelling and graphics for engineering design. If anyone here has some information about good resources to start with, please let me know. Any help will be highly appreciated. Thanks!
Mubeen
also graphics libraries which are most popular in C++ industry.
BinaryByter
renaming it spat errors
fixed up. Looks like it is still ~2.070 s
Prometheus
BinaryByter
Stdio.h is probably the most popular.
stop trolling newbies 😆
BinaryByter
the most popular one is <conio.h>
Mubeen
Stdio.h is probably the most popular.
query edited for clarification. It's about graphics.
Roxifλsz 🇱🇹
the most popular one is <conio.h>
Nice bait maxi, but you're the troll now
Prometheus
stop trolling newbies 😆
Just answering honestly lol
Prometheus
Nice bait maxi, but you're the troll now
Idk if he's trolling I mean I add that just to add it sometimes
BinaryByter
Just answering honestly lol
I think that iostream is used more than stdio
BinaryByter
if you still use stdio, you are a monster
Prometheus
if you still use stdio, you are a monster
That's the same thing my ma tells me 😢 lol. Honestly, I've used it so long it's an addiction.
BinaryByter
luckily, clinl doesn't have stdio
Prometheus
Doesn't yet.. Just wait until this refactoring happens 😏 lol
Anonymous
C one is marginally faster lol
Anonymous
BinaryByter
again: time is not precise
BinaryByter
run time many times
BinaryByter
besides, you use cout and not printf in the C++ one
Anonymous
When u use printf in c++?
BinaryByter
what the fuck do you do in the main function?
BinaryByter
holy shit I wish indian universities didn't teach people to become monkeys
Anonymous
Cout is a bit slower
BinaryByter
ONLY because of initialization
BinaryByter
then, it's as slow/fast as printf
BinaryByter
but io isn't the point of the test
BinaryByter
holy shit I wish indian universities didn't teach people to become monkeys
BinaryByter
Wat
WHAT THE FUCK DO YOU DO IN THE MAIN FUNCTION?
BinaryByter
sammy
Anonymous
Wdym
BinaryByter
why not just instantiate b and then use the function?
BinaryByter
anyway
BinaryByter
why don't we stop fighting about useless stuff?
Anonymous
Okay
Anonymous
IT ISN'T
C is faster ( VERY VERY VERY TINY DIFFRENCE ) but i like C++ C++ is great , Great STL, safer than C JUST WRITE YOUR CODE DONT THINK ABOUT THESE STUFF code is important
Prometheus
C is faster ( VERY VERY VERY TINY DIFFRENCE ) but i like C++ C++ is great , Great STL, safer than C JUST WRITE YOUR CODE DONT THINK ABOUT THESE STUFF code is important
In large scale projects, or projects that run the same code many times, a very very very tiny difference can add up very quickly.
Anonymous
code is very important than Language (in case C or C++)
Anonymous
C is faster?
Yes ( very tiny )
Mr. COwO2 Preis
BinaryByter
Rethorical question, both languages are as fast
Mr. COwO2 Preis
c produces less output
Anonymous
C++ need runtime libraries