Looking up cached methods is faster even for operations because it avoids having to load each class named in the String signature array from MBeanServer.invoke. This optimization is now implemented with common code for Standard MBeans and MXBeans that finds Method objects in Maps. For invoke, it is only necessary to compare the received signature array with the signature array of the previously-discovered operation (or operations, in case of overloading).
A simple microbenchmark that calls MBeanServer.getAttribute on a Standard MBean 100000 times in a tight loop (measured after "warming up" the JVM by first repeatedly executing the test code without measuring) shows a reduction from 918 ms to 246 ms, i.e. about 270% faster.
Not a bad idea, but I am not sure looking up in the cache will be faster than
lookup in the Class, at least for operations.
For attributes, caching the getter/setter is probably a good idea, although
the impact on memory footprint must be kept in mind.
Since the invoke() is now performed by the Metadata, we can imagine to provide
several implementation of MetadataImpl and let the user choose which one
he wishes to use.