Re: [PATCH v2 [rebased]] [Enhancement] Improve internals / refactoring.

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

 



Hi Shahzad,

On Fri, 1 Feb 2019 at 19:54, Shahzad Lone <shahzadlone@xxxxxxxxx> wrote:
>         git_zstream stream;
> -       unsigned char ibuf[1024 * 16];
> -       unsigned char obuf[1024 * 16];
> +       unsigned char ibuf[16384];
> +       unsigned char obuf[16384];
>         unsigned long olen = 0;

This change also brings very little value because most compilers will
evaluate constant expressions such as this at compile time. A quick
google query on "Constant Folding" will tell you all about this.

I love optimization as much as the next guy, but I also feel an argument can
be made for readability too. The former version is far easier to see that
the array will be 16KB in size, where 16384 is more difficult to visualize.



[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]

  Powered by Linux