Thread (1 message) 1 message, 1 author, 2019-10-17

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

From: Junio C Hamano <hidden>
Date: 2019-10-17 07:35:26

"Hariom Verma via GitGitGadget" [off-list ref] 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 ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help