Thread (59 messages) 59 messages, 6 authors, 2021-01-27

Re: [PATCH v17 08/26] x86/mm: Introduce _PAGE_COW

From: Yu, Yu-cheng <hidden>
Date: 2021-01-21 20:45:55
Also in: linux-arch, linux-doc, linux-mm, lkml

On 1/21/2021 12:26 PM, Dave Hansen wrote:
quoted
Usually, the compiler is better at making code efficient than humans.  I
find that coding it in the most human-readable way is best unless I
*know* the compiler is unable to generate god code.
"good code", even.

I really want a "god code" compiler, though. :)
With my version of GCC, the shifting implementation creates five 
instructions, all operate on registers only.  The other implementation 
also creates five instructions, but introduces one jump and one memory 
access.  But, you are right, being readable is also important.  Maybe we 
can tweak it a little or create something similar to those in bitops.

--
Yu-cheng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help