Re: [PATCH] speed: reuse char instead of recreation in loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel Barkalow wrote:
>On Mon, 25 May 2009, Thomas Spura wrote:
>> Am Mon, 25 May 2009 22:16:02 +0200 schrieb Bj?rn Steinbrink:
>> > On 2009.05.25 19:44:10 +0000, Thomas Spura wrote:
>> >> Move a char and a char * outside of a for loop for speed improvements

>> > I doubt that this makes any difference at all.

>> With ints, the loop costs about 40% of speed. Without recreation, it 
>> should be always faster.

>optimizations in this code for it to make, but, in general, letting 
>variables in loops go out of scope (in C) only improves optimization 
>possibilities.

Quite.  The proposed patch is more likely to slow down the code than to
speed it up.
-- 
Sincerely,
           Stephen R. van den Berg.

E Pluribus Unix.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]