[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3
From: |
Neil Hotmail |
Subject: |
Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3 |
Date: |
Sat, 12 Oct 2002 18:54:33 +0100 |
On Saturday 12 October 2002 19:14, Ingo Ruhnke wrote:
> A variable should have a single well defined purpose, not change its
> purpose suddenly half the way down. Variables are not an expensive
> resoure which needs to get recycled, so we shouldn't do that.
| Well that's usually true but I'm not too strict in this regard. At this
point
| it's only a caching variable and I don't have any problems with reusing
| them. But declaring a pointer isn't costly enough that I'd really care
about
| it.
A good optimising compiler should detect the lifetimes of the variables, and
where they are the same size and do not overlap in their lifetime, it should
reuse them, declaring it as two different pointers should result in exactly
the same code (byte for byte) being generated, so the cost is nothing.
Ginge
- Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3, Ingo Ruhnke, 2002/10/12
- Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3, David Philippi, 2002/10/12
- General Windows Cleanups, Neil Hotmail, 2002/10/12
- Re: General Windows Cleanups, David Philippi, 2002/10/12
- Re: General Windows Cleanups, Neil Hotmail, 2002/10/12
- Re: General Windows Cleanups, David Philippi, 2002/10/12
- Re: General Windows Cleanups, Neil Hotmail, 2002/10/12
- Re: General Windows Cleanups, David Philippi, 2002/10/12
Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3, Ingo Ruhnke, 2002/10/12
- Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3, David Philippi, 2002/10/12
- Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3,
Neil Hotmail <=
- Re: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs liquid.cxx,1.2,1.3, David Philippi, 2002/10/12