To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 3617
3616  |  3618
Subject: 
Re: Blue screen of death
Newsgroups: 
lugnet.org.ca.rtltoronto
Date: 
Thu, 14 Feb 2002 15:39:43 GMT
Viewed: 
430 times
  
variable++ is probably even better for a simple increment (variable--
for decrement). Of course, the compiler may recognize this and translate
"++" and "+=1" as the same.

Chris Magno wrote:


variable = variable + 1 is just not as efficient as

variable += 1

So i changed ALL my code math from the former to the latter.  the end
result, less crashes (so far none) and faster speed.

yep shaved a whole second off.  watch out Derek I'm right on your heels.

p.s.  I STILL do not "grok"  +=




Chris
Victory will be mine!!






Message has 1 Reply:
  Re: Blue screen of death
 
(...) Well if its a good compiler, v = v + 1; v += 1; v++; v -= -1; s = 1; v += s; would all be equivalent. Derek (23 years ago, 14-Feb-02, to lugnet.org.ca.rtltoronto)

Message is in Reply To:
  Re: Blue screen of death
 
(...) like I'd even give that little PUNK KID the chance to tell me my "robot sucks." HA, if he or his dopple ganger (sp) even open his mouth I'm gonna WHACK him. With some help from (someone) It was pointed out that variable = variable + 1 is just (...) (23 years ago, 14-Feb-02, to lugnet.org.ca.rtltoronto)

11 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR