Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.sources.d Subject: Re: "look" utility? Message-ID: <5912@mimsy.UUCP> Date: Sat, 21-Mar-87 13:09:38 EST Article-I.D.: mimsy.5912 Posted: Sat Mar 21 13:09:38 1987 Date-Received: Sun, 22-Mar-87 17:46:44 EST References: <837@maynard.BSW.COM> <4670001@hpihoah.HP.COM> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 19 In article <4670001@hpihoah.HP.COM> cire@hpihoah.HP.COM (Eric B. Decker) writes: >the key assumption is the file is already sorted so a binary search >works. this is generally not true. `Look' operates on sorted dictionaries. It is not `generally not true' *in the cases for which the program was designed*. >to be true one then needs to include the time needed to sort files >of the size we are talking about. fgrep wins. Only if the file changes often: If not, it is better first to sort it. In any case, fgrep does not win; see James A. Woods's article <706@ames.UUCP>, `Get Hep to Kanji-Ready Five-Algorithm [ef]?grep' for details. If you have only the standard family of greps, use egrep. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: seismo!mimsy!chris ARPA/CSNet: chris@mimsy.umd.edu