[PATCH 3/3] parse_config: use getline to read config

Rich Felker dalias at aerifal.cx
Sun Jun 19 12:42:51 UTC 2011


On Sun, Jun 19, 2011 at 01:08:53PM +0200, Denys Vlasenko wrote:
> On both machines speedup is not so big. Hash seems to help more then getline:
> on F15, it reduced run time from 19 to 16 seconds, while getline won
> ~0.5 sec only.

For what it's worth, getline should make a much more dramatic
difference on libcs where it's not implemented with getc_unlocked but
rather memchr - that would be at least glibc and musl.

> Don't take me wrong, I'm not saying the patches are not good.
> I am saying we need to figure out how much *each* patch speeds up
> modprobe, and in what conditions (IOW: why you see big speedup,
> and I see small one), so that we can document it in comments
> and save some head scratching for future hackers.

The discussion here on the ML regarding getline implementations would
be a good source for part of the comments.

> How much speedup you get if you use getc_unlocked instead of getline
> (see attached patch)?

I would guess nearly the same speedup on uClibc where getline just
calls getc_unlocked, but much less benefit on good getlines.

Rich


More information about the busybox mailing list