>it was stated that a method call is UP TO 7 times slower than a function call. What conditions make the method call that much slower.
The fact that the function called depends on the object. This means that there must be an extra decision made at runtime as to which function is called with a method. A procedure call always goes to the same place (assuming the same library is set).
>Are there certain guidelines i can follow to minimize the time required for a method call ?
Not that I know of.
>Also if disk access is the slowest part of the process at say 10000 times slower than executing a method call or 70000 times slower than
>making a function call then isn't the difference in speed irrelevant?
It depends on the application. If it reads a tiny table, then does half an hour's worth of computations with the data, then the method calls will predominate.
However, as I said here recently, "Premature optimization is the root of all evil." First make it work. Then (if and only if necessary) make it fast.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only