Re: C# very optimisation
- From: Helge Jensen <helge.jensen@xxxxxxx>
- Date: Wed, 18 May 2005 14:58:01 +0200
Søren Reinke wrote:
Thank you, i already use unsafe for my processing of course but i would like to know more about little optimisations now (juste like "++i" instead of "i++")
Try a profiler, and optimize the places when processing time is actually used. That way your optimizations may actually matter instead of just waste your time and make the code unreadable.
++i and i++ is not the same if used within things like calling methods and stuff like that.
more precicely, ++i and i++ are not the same when used as an expression.
Is the one considered faster than the other ?
When defining your own "operator++" the x++ variant needs to copy the old object, ++x does not.
I can't imagine that there is *any* difference whatsoever for the performance using ++i or i++ (esp. on integral types), and will continue to think that untill I see a test-program proving otherwise.
-- Helge Jensen mailto:helge.jensen@xxxxxxx sip:helge.jensen@xxxxxxx -=> Sebastian cover-music: http://ungdomshus.nu <=- .
- Follow-Ups:
- Re: C# very optimisation
- From: Frank Hileman
- Re: C# very optimisation
- From: Ennixo
- Re: C# very optimisation
- References:
- C# very optimisation
- From: Ennixo
- Re: C# very optimisation
- From: Jon Skeet [C# MVP]
- Re: C# very optimisation
- From: Ennixo
- Re: C# very optimisation
- From: Lebesgue
- Re: C# very optimisation
- From: Ennixo
- Re: C# very optimisation
- From: Søren Reinke
- C# very optimisation
- Prev by Date: Re: C# very optimisation
- Next by Date: Re: C# implicitly convertion??
- Previous by thread: Re: C# very optimisation
- Next by thread: Re: C# very optimisation
- Index(es):
Relevant Pages
|