Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Build large relative POPUP in reverse mode is faster
Message
De
26/05/2003 10:50:53
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Titre:
Build large relative POPUP in reverse mode is faster
Divers
Thread ID:
00792824
Message ID:
00792824
Vues:
43
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform