[wp-hackers] Micro optimization - is_a() vs instanceof

Jeff Morris wp-hackers at zipsbazaar.co.uk
Fri Jan 4 18:33:13 UTC 2013

On 04/01/2013 17:32, Otto wrote:
> The difference is probably negliable, but it adds up over time. It
> would make sense to switch to instanceof anywhere that it is possible
> to do so, however I don't think it is a pressing concern. One of those
> fix-it-if-you-spot-it things.

IDE search on WP 3.5, "is_a(":

/wp-includes/ : 53 matches
/wp-admin/includes/ : 4 matches

About an hour's work to refactor, and that's being meticulous.

For bbpress 2.2.3 I also got:
/wp-content/plugins/bbpress/includes/ : 7 matches

A dime to a dollar says they'll fix it before WP core does.

More information about the wp-hackers mailing list