[Gambas-user] trimming extra spaces from within a string.

Jussi Lahtinen jussi.lahtinen at gmail.com
Mon Nov 9 23:43:07 CET 2020


Your way is run only twice, the other ways are run 500 times. Thus it seems
your way is faster.
You already have this program, it is the IDE. See profiler.

Jussi


On Tue, Nov 10, 2020 at 12:25 AM Bruce Steers <bsteers4 at gmail.com> wrote:

> I'm reading it wrong aren't I :(
>
> looing at the InTrim snapshot it looks like it's using my method AND
> regexp too?
> so i don't think im reading it right at all lol.
> BruceS
>
> On Mon, 9 Nov 2020 at 22:14, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>> I'm not sure if i'm reading those reports right , i had to look up dauer
>> to see it meant duration.
>> and what on earth is that program ?  i want it lol :)
>>
>> But from what i can see,,  my way was the fastest at 1.4 yes?
>>
>> this makes me happy as i initially used the "while and replace" method
>> then thought to improve it.
>> looks like i could not have done a better job eh? :)
>>
>> Unless i'm reading it all wrong?
>>
>> Thanks Christof , very enlightening :)
>>
>>
>> On Mon, 9 Nov 2020 at 20:44, Christof Thalhofer <chrisml at deganius.de>
>> wrote:
>>
>>> Am 09.11.20 um 19:38 schrieb Bruce Steers:
>>>
>>> > do you think using Replace() would be faster than my initial InTrim()
>>> > function method ?
>>>
>>> It's ultra-ultra-ultra-...repeat 1.000.000 times ...slow.
>>> I write this mail while it is running in the background ... 'til now, I
>>> stopped it.
>>>
>>> It needs about 1.4 seconds for a 314 k text. For the test which does the
>>> text 500 times it would need about 12 minutes.
>>>
>>> :-)
>>>
>>> Alles Gute
>>>
>>> Christof Thalhofer
>>>
>>> --
>>> Dies ist keine Signatur
>>>
>>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>>
>>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201110/002b7107/attachment-0001.htm>


More information about the User mailing list