Hi Fabio
You wanted comments, and here are mine: Why bother? In my applications I never have more than 20 elements in my popups. Many 1000's does not exactly give the users a friendly user interface... <s>. Many years ago, at a devcon, the keynote had a section with user hostile interfaces. Yours would fit nicely in that section.
On the other hand, nice work. You should post your results to Mac Rubel, he loves this kind of stuff.
>Exec this code:
>? 'Direct mode'
>DEFINE POPUP pptest relative
>FOR k=0 TO 20
>t1=SECONDS()
> FOR IJ=k*1000+1 TO (k+1)*1000
> DEFINE BAR m.ij OF pptest PROMPT '\-'
> NEXT
>? ij-1,SECONDS()-T1
>next
>RELEASE POPUPS pptest
>? 'Reverse mode'
>DEFINE POPUP pptest relative
>FOR k=0 TO 20
>t1=SECONDS()
> FOR IJ=k*1000+1 TO (k+1)*1000
> DEFINE BAR m.ij OF pptest PROMPT '\-' BEFORE _MFIRST
> NEXT
>? ij-1,SECONDS()-T1
>next
>RELEASE POPUPS pptest
>
>I do not know the inner structure with which the "relative popup" are implemented.
>In the hypothesis that was used of the Array, I expected that in reverse mode the construction it was slower.
>Until 6000 elements, it is therefore (slower 300%).
>
>Surprise, beyond the 6000 elements (out of cpu cache memory mapping) the duplicated search of the id is 50% more express.
>
>Deduction: it is not implemented like Array, but like list, and the direct algorithm is not done good.
>
>Any comment?
>
>Fabio