Source-Changes-D archive

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

Re: CVS commit: src/usr.bin/make



In article <20160603012159.A51B6FBBD%cvs.NetBSD.org@localhost>,
Simon J. Gerraty <source-changes-d%NetBSD.org@localhost> wrote:
>-=-=-=-=-=-
>
>Module Name:	src
>Committed By:	sjg
>Date:		Fri Jun  3 01:21:59 UTC 2016
>
>Modified Files:
>	src/usr.bin/make: main.c make.h meta.c nonints.h var.c
>
>Log Message:
>Add cached_realpath()
>
>realpath(3) is expensive, and meta mode at least uses it extensively.
>We use cached_realpath() to save the result of successful calls to
>realpath(3) in a private variable context.
>
>This improves the worst case performance (eg examining libc with
>nothing to do) by a factor of 4.

I forgot to ask if it is worth it to cache the misses too...

christos



Home | Main Index | Thread Index | Old Index