Anonymous
Anonymous
BinaryByter
Anonymous
Generally I've seen c to be faster. I'll try comparing tomorrow in my pc
BinaryByter
Anonymous
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
BinaryByter
in C the difference is clear
BinaryByter
one exist the other doesnt
Mihail
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.
Prometheus
BinaryByter
BinaryByter
the most popular one is <conio.h>
BinaryByter
if you still use stdio, you are a monster
BinaryByter
BinaryByter
luckily, clinl doesn't have stdio
Prometheus
Doesn't yet.. Just wait until this refactoring happens 😏 lol
BinaryByter
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
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
Anonymous
BinaryByter
Wat
WHAT THE FUCK DO YOU DO IN THE MAIN FUNCTION?
Anonymous
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
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
Anonymous
Anonymous
code is very important than Language (in case C or C++)
BinaryByter
Mr. COwO2 Preis
BinaryByter
Rethorical question, both languages are as fast
Anonymous
Mr. COwO2 Preis
c produces less output
Anonymous
C++ need runtime libraries