Regarding speed, I just checked if the intermediate steps gets faster if I replace the associative array part with a simple
If(not(contains(), insert into(mylist ... - no benefit.
New Column( "unique entries",
Expression,
Formula(
Local( {nr = N Rows( Current Data Table() )},
If( Row() == nr,
Caption( "done" )
);
Match( :variant,
1, Associative Array( :list from sequence[Empty()] ) << get keys,
2,
myList = {};
For Each( {entry}, :list from sequence,
If( !Contains( myList, entry ),
Insert Into( myList, entry )
)
);
myList;
);
)
)
)
for 1mio rows, I get:
So 1:0 for associative arrays. Any better idea?
[Another 2+2 seconds are needed for the columns :list from sequence
and :N unique entries.
So, no real benefit to get into the ms regime for the intermediate step]