Date: Thu, 13 Jun 2002 17:46:51 -0700 From: Juli Mallett <jmallett@FreeBSD.org> To: Anton Berezin <tobez@tobez.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.port.mk Message-ID: <20020613174651.A70331@FreeBSD.ORG> In-Reply-To: <20020613195509.GA510@heechee.tobez.org>; from tobez@tobez.org on Thu, Jun 13, 2002 at 09:55:09PM %2B0200 References: <200206131820.g5DIKfB53863@freefall.freebsd.org> <3D08F0A2.A10E3D52@FreeBSD.org> <20020613195509.GA510@heechee.tobez.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Anton Berezin <tobez@tobez.org> escriurères > On Thu, Jun 13, 2002 at 10:21:06PM +0300, Maxim Sobolev wrote: > I think an extra warning might be in order here. It is possible, though > unlikely, that the extra .bak files produced with an application of > REINPLACE_CMD will accidentally get installed and thus break a valid > plist. > > It might be better to consider removing the -i.bak from REINPLACE_CMD; > people who need it will be able to add it if necessary. > > =Anton. Just remember it's -i "" not just -i with sed(1), in hopes of it being standardisable, etc., And since I have no better place to mention it, for simple things anyway sed(1) seems to win in performance over Perl. I'd imagine that the buildup/teardown time for regex matches (compile, free, etc.) are much better with sed(1), too, even if we do lose some PCRE functionality. Here's some numbers that came up pretty consinstently, especially winning more as files grow. ref5% du -h bigfile 2.8M bigfile ref5% mv bigfile bigfile1 ref5% cp bigfile1 bigfile2 ref5% time perl -pi -e 's/^/foo /' bigfile1 perl -pi -e 's/^/foo /' bigfile1 5.91s user 0.59s system 83% cpu 7.752 total ref5% time sed -i "" 's/^/foo /' bigfile2 sed -i "" 's/^/foo /' bigfile2 1.70s user 0.45s system 53% cpu 4.032 total ref5% cmp bigfile1 bigfile2 ; echo $? 0 ref5% -- Juli Mallett <jmallett@FreeBSD.org> FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020613174651.A70331>