libtool
[Top][All Lists]
Advanced

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

Re: Fixing Re: Is libtool being maintained at all?


From: Dalibor Topic
Subject: Re: Fixing Re: Is libtool being maintained at all?
Date: Tue, 15 Jul 2003 10:07:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030624

Hi Albert,

Albert Chin wrote:
On Mon, Jul 14, 2003 at 08:25:06PM +0200, Dalibor Topic wrote:

The proper way to fix it could be to do a binary search over multiples of 2 instead of the linear search emplyed now. Use a resonable minamal value like 2**13, which leaves only a few options between 2**13 and 2**17, which is the current upper limit for the test. Starting with 2**15, you only need three tests to figure out the maximal command line length, instead of 17. How does that sound?


How do you start out with 2^13 printable characters?


I haven't really programmed m4 yet, so I can't say for sure. The existing test apparently does two things:
* spawn some kind of a new shell
* concatenate test string with itself

So for example just doing a loop that concatenates the test string with itself, thereby doubling its size on each iteration, until the length is 2**13 would be simple. You don't really need to measure test string length, just terminating the loop when the counter becomes 14 should be enough. This would save 13 shell spawnings.

For an even better effect, just insert an 8K test string into libtool.m4. It's almost 200k already, I doubt another 8k would hurt much. That saves another 13 string concatenations and tests. It's also much simpler than the first method, where one has to be careful with loop limits.

If noone volunteers to write it, and I end up doing it, I'll take the second method, since we need all the speed we can get on slow platforms. If you have a better idea, or comments to my proposals, I'd like to hear them.

cheers,
dalibor topic





reply via email to

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