bug-make
[Top][All Lists]
Advanced

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

RE: filter-out, very slow?


From: Daniel Shane
Subject: RE: filter-out, very slow?
Date: Fri, 30 Jan 2004 14:35:02 -0500

Thanks for your help Ted,

I really liked the MAKE_LONG_LIST, I'm sure I will find a use for such a
function in the future. However, I does not look too hard to code filter-out
in such a way that it is 100 times faster. I looks n^2 now, and by using
more memory (hash) it could become 1-1.5*O(n) quite easily. Anyone have
enough experience with make to make the change?

Daniel Shane


-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of Ted
Stern
Sent: Friday, January 30, 2004 2:14 PM
To: address@hidden
Subject: Re: filter-out, very slow?


On 30 Jan 2004 at 11:03 PST, Ted Stern wrote:
>
> On 30 Jan 2004 at 09:55 PST, Daniel Shane wrote:
>> I see,
>>
>> In that case, could we add a new text function that would work like
>> filter-out, but simply faster? We could call it comm. The reason is quite
>> simple, when strings become overwhelming, it is impossible to pass them
to
>> a shell script because of command line size limit. Therefore, they are
not
>> easy alternative to get the functionnality of filter-out at a reasonable
>> speed.
>>
>> Daniel Shane
>
> Hi Daniel,
>
> If that is your problem, there is a work-around solution (suggested by
Paul
> to me 4 years back).
>
> You can use make functions to echo (or rather printf) the elements of your
> variable into a file.  Then you use xargs to process those values in
> sections that will fit in your command line -- that is precisely the
> intended use of xargs.

Another thought -- once your variable is in a file, with one word per line,
you can then use all manner of unix commands to process it.  For instance,

       fgrep -v -f filter-out.list variable.list

Ted
--
 Ted Stern                                 Applications Group
 Cray Inc.                               office: 206-701-2182
 411 First Avenue South, Suite 600         cell: 206-383-1049
 Seattle, WA 98104-2860                     FAX: 206-701-2500

 Frango ut patefaciam -- I break that I may reveal
 (The Paleontological Society motto, equally apropos for debugging)



_______________________________________________
Bug-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-make





reply via email to

[Prev in Thread] Current Thread [Next in Thread]