[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bad uses of patterns (was: Re: Feature request: names for constants)
- From: Tim Hill <drtimhill@...>
- Date: Thu, 24 Sep 2015 10:21:09 -0700
> On Sep 24, 2015, at 9:45 AM, Soni L. <fakedme@gmail.com> wrote:
>
>
>
> On 24/09/15 12:39 PM, Dirk Laurie wrote:
>> Consider the following code:
>>
>> local trim_pattern = "^%s*(.*%S)%s*$"
>>
> Wouldn't it be faster if you trimmed at start, reversed, then trimmed at start again? (or maybe at start, then at end?)
>
> --
> Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.
>
>
It would be faster (by a wide margin) to have a C function do it.
—Tim