Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Re: Mac port: Status Update


As an old Smalltalker (and someone who worked on Method.invoke(...) for the VA/ME class library), I'm always amazed at how much work is done by reflect. In Smaltalk, you could trust that "perform:" would be only about 2x slower than just sending the message. In Java, Method.invoke(...) can be 20x slower or worse. There other issues with using reflect, like making it very difficult for library optimizers to detect which methods can be removed or optimized.

Basically, reflect is one of those things to be avoided. Heck, it's nearly as bad as finalization. ;-)

McQ.



Maurice Parker <maurice@xxxxxxxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

12/12/2001 12:02 AM
Please respond to platform-swt-dev

       
        To:        <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        Re: [platform-swt-dev] Re: Mac port: Status Update

<snip>
I don't think that NSSelector using reflection will cause much of a
performance problem.  As long as it's not every method of every object, I
doubt that it will be too much of a problem.  Of course with some things
like this, it's almost impossible to tell until you test it.

<snip>



Back to the top