Big optimization for get_method_list
authorDave Rolsky <autarch@urth.org>
Sat, 14 Aug 2010 16:54:30 +0000 (18:54 +0200)
committerDave Rolsky <autarch@urth.org>
Sun, 15 Aug 2010 08:47:50 +0000 (10:47 +0200)
commitea6dca1713c5f12a07e165b0e5d70b9455682414
tree4ac1a1a09780f5a14f902d048b33bb29bebdc095
parentbfeff08aed30cc57ffe4a2f4306f227485635e89
Big optimization for get_method_list

By checking for a CODE slot in the glob, we can avoid a lot of calls to
->has_method, which is quite expensive.

This seems to provide a speedup of approximately 10% when compiling
Markdent::Simple::Document (and all the classes it loads in turn).
lib/Class/MOP/Mixin/HasMethods.pm