登录
注册
首页
文章
分享
专题
网页模板
MO
Mote
Mote
这家伙太懒了,什么都没留下
0 关注
0 粉丝
关注
私信
文章分类
日常记录
1
工作日志
5
转载文章
1
其它
3
职位技能
常用语言
< 暂无 >
常用工具
< 暂无 >
擅长技能
< 暂无 >
Java 8 中 CAS 的增强
几天前,我偶然地将之前写的用来测试AtomicInteger和synchronized的自增性能的代码跑了一下,意外地发现AtomicInteger的性能比synchronized更好了,经过一番原因查找,有了如下发现: 在jdk1.7中,AtomicInteger的getAndIncrement是这样的: public final int getAndIncrement
1年前发布
4035阅读
评论