Re: [CMS-PIPELINES] swap two records

2019-08-18 Thread Amphitryon
Am 18.08.2019 um 21:44 schrieb Rob van der Heij:
> Did I compete with the join | split  approach? Can I also participate with
> this?

You cap yourself: now 60 ms only.

To avoid the Not I bracketed Deal:

   ...  literal | d: deal | drop  ...

alas there is no further gain by that.

Ciao.Mike
--
www.Ok.de - die kostenlose E-Mail Adresse


Re: [CMS-PIPELINES] swap two records

2019-08-18 Thread Rob van der Heij
On Sun, 18 Aug 2019 at 15:51,  wrote:

> RITA showed, Glenn's solution is honourable second, while Rob's
> suggestion only penultimate far behind ;)
>

Did I compete with the join | split  approach? Can I also participate with
this?

pipe (end \) literal a b c a b 2 | split | x: if between /b/ 2 | d: not
deal  | g: gather| x: | cons \ d: | copy | g:


Re: [CMS-PIPELINES] swap two records

2019-08-18 Thread Amphitryon
RITA showed, Glenn's solution is honourable second, while Rob's
suggestion only penultimate far behind ;)

The details: I tested only with one log file of 161'000 lines.
RITA revealed that most of the time is lost (or spent ?) in
rearranging the records for later advantageous use. Instead of
inserting a tag to many lines I now tag _all_ and remove where
appropriate, Substr is so much faster than Insert. While this
preparation takes seconds, swapping of about 600 records is a
matter of milliseconds not worth to shorten.

But it's hobby and hours are worth a new insight.
Glenns solution: 171 ms, with Pick 85 ms,
Rob's suggestion: 69 ms.

Ciao.Mike
--
www.Ok.de - die kostenlose E-Mail Adresse