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对象的销毁时间 | 闲云野鹤 #31

Open
weiweitop opened this issue Jun 25, 2021 · 0 comments
Open

尝试测量Java对象的销毁时间 | 闲云野鹤 #31

weiweitop opened this issue Jun 25, 2021 · 0 comments

Comments

@weiweitop
Copy link
Owner

weiweitop commented Jun 25, 2021

https://weiweitop.fun/2021/05/21/尝试测量Java对象的销毁时间/

Oh, and one more thing: there is a severe performance penalty for using finalizers. On my machine, the time to create and destroy a simple object is about 5.6 ns. Adding a finalizer increases the time to 2,400 ns. In other words, it is about 430 times slower to create and destroy objects with finalizers. ——Effective Java Second Edition

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

1 participant