qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] tcg: Add tlb_index_and_entry() function


From: BALATON Zoltan
Subject: Re: [PATCH] tcg: Add tlb_index_and_entry() function
Date: Tue, 30 May 2023 11:44:38 +0200 (CEST)

On Mon, 29 May 2023, Richard Henderson wrote:
On 5/29/23 17:05, BALATON Zoltan wrote:
The tlb index and entry are often retrieved together and tlb_entry()
already calls tlb_index() so it could easily return it. Add a
tlb_index_and_entry() function that does that to simplify callers and
maybe avoid some duplicate calculations.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>

The compiler does a good job removing duplicate calculations already.
What effect do you see with this?

Hard to tell because measurements always change slightly when I run some benchmark in guest so if it has an effect it's not big but I find it more readable with a single call than two calls so that's the main motivation here.

Regards,
BALATON Zoltan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]