Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB Classes
Message
 
To
27/12/1998 01:29:33
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00169994
Message ID:
00170548
Views:
20
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform