|
-
January 12th, 2000, 11:51 PM
#1
Function vs. COM
I have a function with 15 parameters which I have to call often.
Does having as many parameters slow execution too much? Is it worth it to write a COM object?
-
January 13th, 2000, 04:42 PM
#2
Re: Function vs. COM
If you turn that one function into a COM object, then you have to create the COM object each time you call it (unless you declare it's variable global). In either case, you will still have to pass the 15 parameters to the object. If you were to turn those parameters into properties of the COM object, then you'd have to make an additional 15 calls to the object, decreasing the efficiency of the object.
In my opinion, no don't convert it. Rather, see if there is any way you can cut down on the number of parameters being passed. Is there any way to derive one of the values from any of the other values being passed?
Hope this helps a little,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|