On Sat, Jul 24, 2010 at 5:57 AM, Nathan Rixham <nrix...@gmail.com> wrote:

> If you think about it, each class, function, method, line of code all gets
> interpreted in to opcodes and executed - so, no matter how you split it up,
> it's still going to produce roughly equivalent opcodes.
>

An exception to this is when you have a class that can be heavily
refactored. For example, say you have a data access class that operates on
books in the database (standard CRUD) and also generates XML and JSON views
of the books. If you refactor the class to extract the XML and JSON export
into separate classes--something that should be done for many other
reasons--you won't have to load and parse that code when you're not
exporting the data.

David

Reply via email to