Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB Classes
Message
 
À
27/12/1998 01:29:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00169994
Message ID:
00170548
Vues:
21
Hi Albert,

>Not really, just the optional ability for the compiler to generate a jump table based on data types. Presumably this would be much faster than our current "if type("parameter") = '?'" method, and easier to code and maintain.

I'm not sure this would be much faster. After all VARTYPE() is quite fast, probably as fast as possible since it's basically one line of C code (it returns the ev_type member of a value structure plus some additional checking for NULL plus an error handler for non existing variables).

The most time consuming parts of a method call are

- locating the actual method,
- preparing the environment, like creating a new level of private variables, preparing a new DO level, etc.
- evaluating all parameters and creating the parameter variables.

Also, some of the Init code would be the same for different data types which requires an additional method call that also slows down the Init. And, during creation of an object, we also have the overhead of the actual creation. That means locating all parent classes, loading them, evaluating the fields in the VCX table, etc.

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform