Posts: 13,214
Threads: 25
Joined: Oct 2010
Well okay, it's been a couple months since I've watched the video. And I'm not particularly good at hearing everything in videos unless there's subtitles.
Posts: 5,455
Threads: 18
Joined: Jul 2011
I'm sure you have it right, you usually do. The random things you know are funny to me. The coach in the video was obviously not going to get something like this right, which made it even funnier.
I'd apologize for the threadjack, but that's kinda the whole point around here. Carry on!
Posts: 7,658
Threads: 31
Joined: Jun 2011
Why apologize for a threadjack? You know scoopin are here for one thing, to win the thread wars. Post++!
Posts: 13,214
Threads: 25
Joined: Oct 2010
(October 4th, 2013, 08:55)Boldly Going Nowhere Wrote: I'm sure you have it right, you usually do. The random things you know are funny to me. The coach in the video was obviously not going to get something like this right, which made it even funnier.
I'd apologize for the threadjack, but that's kinda the whole point around here. Carry on!
Yes, I have a tendency to know random things because I come across them and then I remember them. But I realized that you were just copying what the parody coach was saying, so if he was saying it as the plural then what you said is correct in that sense.
Posts: 7,916
Threads: 158
Joined: Jan 2012
(October 4th, 2013, 09:06)spacetyrantxenu Wrote: Why apologize for a threadjack?
(October 4th, 2013, 09:06)spacetyrantxenu Wrote: Post++!
Post++;
noob.
Posts: 13,214
Threads: 25
Joined: Oct 2010
++Post is more efficient, you're not doing anything else with the variable anyway.
Posts: 3,018
Threads: 49
Joined: Mar 2004
while (maxPost > post++) {;}
Posts: 6,722
Threads: 59
Joined: Apr 2004
(October 4th, 2013, 10:21)NobleHelium Wrote: ++Post is more efficient, you're not doing anything else with the variable anyway.
Huh? For certain processors and compilers, maybe, but I can't believe that's true in all cases. I would expect Post++; and ++Post; to result in an identical register increment instruction.
October 4th, 2013, 10:46
(This post was last modified: October 4th, 2013, 10:48 by NobleHelium.)
Posts: 13,214
Threads: 25
Joined: Oct 2010
The idea is that at the high level language level, the postfix requires you to store the original value in order to return it, whereas the prefix increments the value and then returns it, not necessitating an extra temporary variable. I have no idea whether that's optimized out at a lower level if the return value is unused though now that you mention it.
Posts: 261
Threads: 0
Joined: May 2012
Not having specific knowledge, I'd guess that ++Post is more efficient if you're doing something with it, but that modern compilers will make the two equivalent if you're not.
++Post;
|