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

Marko Heijnen mailing at markoheijnen.nl
Fri Jan 4 18:37:07 UTC 2013


I saw it on: http://micro-optimization.com/is_a-vs-instanceof

Marko

Op 4 jan. 2013, om 19:33 heeft Jeff Morris <wp-hackers at zipsbazaar.co.uk> het volgende geschreven:

> 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.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list