Does Casting Slow a Program Down?
- From: "PeterOut" <MajorSetback@xxxxxxxxxx>
- Date: 31 Jan 2007 06:50:47 -0800
If I had code like this.
unsigned short usLimit=10
int a[10], i;
for (i=0; i<(int)usLimit; ++i)
{
a[i]=(int)usLimit;
}
would it run slower than this?
int a[10], i, iLimit=10;
for (i=0; i<iLimit; ++i)
{
a[i]=iLimit;
}
Thanks,
Peter.
.
- Follow-Ups:
- Re: Does Casting Slow a Program Down?
- From: David T. Ashley
- Re: Does Casting Slow a Program Down?
- From: santosh
- Re: Does Casting Slow a Program Down?
- From: Richard Heathfield
- Re: Does Casting Slow a Program Down?
- From: Chris Dollin
- Re: Does Casting Slow a Program Down?
- From: Zara
- Re: Does Casting Slow a Program Down?
- Prev by Date: Re: How to improve this sort?
- Next by Date: Re: How to reduce Zero Initialised region.
- Previous by thread: check if the memory is low, from Windows to Unix
- Next by thread: Re: Does Casting Slow a Program Down?
- Index(es):