Re: Does Casting Slow a Program Down?
- From: "Serve Laurijssen" <ser@xxxx>
- Date: Wed, 31 Jan 2007 18:37:08 +0100
"santosh" <santosh.k83@xxxxxxxxx> wrote in message
news:1170256067.706720.20060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Quality of code generation is implementation defined. A good optimiser
might be able to figure out that usLimit is not changed and hence, use
a single, cached value. On some hardware, short and int might be of
the same size and representation. In such cases, the cast never takes
up any object code. But speed of execution is not specified by the
standard and no guarantees are made. An assignent statement that takes
ten days to complete is perfectly legal, as per the standard, as long
as all the side effects are resolved before the next sequence point.
I find the general question which (I think) hes asking interesting.
Can integer casts generate extra instructions?
How about floating point casts?
.
- Follow-Ups:
- Re: Does Casting Slow a Program Down?
- From: Ben Pfaff
- Re: Does Casting Slow a Program Down?
- References:
- Does Casting Slow a Program Down?
- From: PeterOut
- Re: Does Casting Slow a Program Down?
- From: santosh
- Does Casting Slow a Program Down?
- Prev by Date: Re: How to reduce Zero Initialised region.
- Next by Date: Re: Does Casting Slow a Program Down?
- Previous by thread: Re: Does Casting Slow a Program Down?
- Next by thread: Re: Does Casting Slow a Program Down?
- Index(es):
Relevant Pages
|