Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

effiecentcay

Name: Anonymous 2007-10-09 3:09

What is more efficient x=x+1; or x++
in C++?

Name: Anonymous 2007-10-09 3:37

Neither are OMG OPTIMIZEDTM. Use assembly.

Name: Anonymous 2007-10-09 3:40

OP here saying this post fails in quality responses.

Name: Anonymous 2007-10-09 3:43

>>3
If you don't know the answer to >>1, it doesn't fucking matter which one is more efficient. Stop posting this bullshit all over my /prog/

Name: Anonymous 2007-10-09 3:45

They both generate the exact same machine code unless your compiler is completely brain dead.

Name: Anonymous 2007-10-09 3:59

OP Here enjoy your dumbassatry I asked the question because I did not know the answer I am gonna go cut my wrist know thats what I get for posting on forCon!

Name: Anonymous 2007-10-09 4:05

With operator overloading, WHO THE FUCK KNOWS.

Also in an expression ++x can be more efficient than x++ (which can end up doing a copy).

Go C++.

Name: Anonymous 2007-10-09 4:12

OP should learn some assembler. Then should learn what a compiler is. Then should die.

Name: Anonymous 2007-10-09 8:49

If you do not have an optimizing compiler, then ++x is faster than both x=x+1 and x++. The latter two would be more or less the same.

HOWEVER, I don't know when the last time was that a compiler was retarded enough not to optimize all three versions to what ++x does, so you would NEVER need to worry about this. Ever.

Name: Anonymous 2007-10-09 10:03

Lol Cfags

Name: Anonymous 2007-10-09 13:00

>>10
HAHAHAHAHAHAHAHHAHAHAHAAHAHAAAA!!!
you think your tough huh?

Name: Anonymous 2007-10-09 15:36

It's a trick question because they do the same thing, ++x is the fastest

Name: Anonymous 2007-10-09 15:44

>>12
you forgot your -O2

Name: Anonymous 2007-10-09 15:54

Efficiency as in compiletime- or runtime-speed?

Name: Anonymous 2007-10-09 16:19

>>13
-funroll-loops actually also FUCK U

Name: Anonymous 2009-02-20 3:07

>>17
I regularly have to store my '\upenis' in a 2 byte character.

Name: Anonymous 2011-02-03 7:36

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List