Re: [PATCH 0/1] builtin/blame.c: bit field constants into bit shift format

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

 



"Hariom Verma via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> we are looking at bitfield constants, and elsewhere in the Git source code,
> such cases are handled via bit shift operators rather than octal numbers,
> which also makes it easier to spot holes in the range (if, say, 1<<5 was
> missing, it is easier to spot it between 1<<4 and 1<<6 than it is to spot a
> missing 040 between a 020 and a 0100). Also, bit shifts lead to low-level
> optimizations because they require fewer calculations for the CPU. 

I think the last sentence is a nonsense for any decent compiler that
turns "1<<5" into 040 at compile time and treats it as literal
integer.  Luckily, it only appears here in the cover letter and does
not appear in the patch proper, so no need to resend the patch to
correct this ;-)




[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