|
This is purely a curiosity that popped into my head this
afternoon. Since each function in a given cf component gets compiled to
an individual java class, am I correct to assume that once a component is
compiled, the number of functions in the component has no bearing on the
performance of any individual function or of the component footprint? For instance, say I have a component (Component1) that has a
method named add(x,y) and that’s it. Say I then have another
component (Component2) that has multiple add methods, 1000 for the sake of
argument, all of which are really just aliases of add(x,y) – obviously
this is for the sake of argument and has little practical use. So our
components look like this: Component1.cfc numeric add (numeric x, numeric y) {
//do some extremely complex stuff here ;) } Component2.cfc numeric add1 (numeric x, numeric y)
{
//do some extremely complex stuff here ;) } numeric add2 (numeric x, numeric y)
{
//do some extremely complex stuff here ;) } … continue to … numeric add1000 (numeric x, numeric
y) {
//do some extremely complex stuff here ;) } Since each method is in a separate java class under the
hood, shouldn’t it be the case that a cfinvoke on any given addX method
in Component2 will execute exactly as fast as Component1.add? TIA, Roland You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
