ArrayDeduplicate without sorting works in Panorama X but not in Panorama 6.0


#1

In Panorama X, this statement

formulafill arrayfilter(Email1,",",{?(arraysearch(arrayrange(Email1,1,seq()-1,","),import(),1,",")>0,"",import())}) 

deduplicates an array without sorting it. In Panorama 6.0, it just puts itself into an endless loop. Why is that?


#2

Your formula worked for me in Panorama 6. My test used only 7 records, with 12 elements in each array.

Were Panorama 6 and Panorama X working with the same data?


#3

Yes - identical. I’ll send you a copy of the database.


#4

It looks like we found something Panorama X can do faster than Panorama 6.

58 PM

07 PM


#5

If I wait long enough, it does work for me - I was expecting it to run more quickly in Panorama 6.0 so when it had taken over a minute, I assumed (wrongly) that it had bogged down.

It takes just over a minute on my new i5 iMac with 16GB of RAM. If I modify the problematic statement to use a simple deduplicate( function, it takes only 11 seconds. In Panorama X, the times are 5 seconds and 9 seconds.

I would be interested to get Jim’s take on why Panorama X is so much faster in this case.


#6

I should clarify the above. Panorama X took 9 seconds to do the non-sorting deduplication and 5 seconds to do the standard dedup.


#7

I’m obviously not Jim, but I expect it’s due to the difference in the way that the arrayfilter( function is implemented. In Panorama X, arrayfilter( is a core function, written in Objective C. In Panorama 6, it’s a custom function that uses a call( function to call a procedure that builds the appropriate arrayfilter statement, and then executes it with an execute statement. Panorama X is just doing the arrayfilter(, while Panorama 6 needs to do a lot of other stuff before it can do the arrayfilter.


#8

Sigh … And here I was, thinking that I’d discovered the Holy Grail of Panorama X performance.