[Rod Johnson] 反射会使程序变慢,但可以忽略不计

"Code that uses reflection is usually slower than code that uses normal Java object creation and method calls. However, this seldom matters in practice, and the gap is narrowing with each generation of JVMs.
The performance difference is slight, and the overhead of reflection is usually far outweighed by the time taken by the operations the invoked methods actually do."

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.