From: Martin Pieuchot Subject: Re: Optimized branch switching? To: gameoftrees@openbsd.org Date: Tue, 13 Sep 2022 15:09:15 +0200 On 13/09/22(Tue) 13:17, Stefan Sperling wrote: > On Tue, Sep 13, 2022 at 12:34:49PM +0200, Stefan Sperling wrote: > > The attached profile trace graph suggests a bottleneck is in the open() > > call in get_file_status(). We might be able to work around that somehow. > > This patch avoids the open() call in favour of lstat(); However, this does > not improve performance. We spend 37% runtime in either open() or lstat(), > so this patch makes no difference. Maybe you could measure the time spent in the syscall with btrace(8) or ktrace(1). This might confirm the time is spent in kernel.