Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java反射的性能奥秘 | 小木屋 #57

Open
sisyphsu opened this issue May 13, 2019 · 1 comment
Open

Java反射的性能奥秘 | 小木屋 #57

sisyphsu opened this issue May 13, 2019 · 1 comment

Comments

@sisyphsu
Copy link
Owner

https://sulin.me/2019/2WAF10Q.html

在多年以前开发DB中间件时,我曾经专门测试研究过Java反射的性能损耗问题,最终结论是Reflect带来的性能损耗对于基础组件来说不可忽视,因此最终采用Javassist的动态字节码方案解决这个性能损耗。最近在研发另一款基础组件时,突发奇想地打算放弃动态字节码,直接使用Reflect硬刚一波。直接调用与反射调用以下是非常简单的JMH测试代码,被测试的方法now直接返回当前时间戳:123456789

@jimojiangdahu
Copy link

玲玲,搁哪儿呢现在

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants