当前位置:网站首页>Learn to record and analyze
Learn to record and analyze
2020-11-08 15:22:00 【Irving the procedural ape】
Learn to record and analyze
Record the difficulties in learning , A little white !
I have not read the source code , Pure Xiaobai , I wrote this article just to improve myself !!! I hope you can point out the mistakes .
Curious, I looked through Integer.valueOf()
Method source code
public static Integer valueOf(int i) { if (i >= IntegerCache.low && i <= IntegerCache.high) return IntegerCache.cache[i + (-IntegerCache.low)]; return new Integer(i); }
First of all, the parameters explain :
static final int low = -128;static final int high;static final Integer[] cache;static Integer[] archivedCache;
high No assignment , So we continue to track down high attribute
static { int h = 127; // If you specify -Djava.lang.Integer.IntegerCache.high=XXX( Enter your own data ) Parameters // The following statement will be executed , Then dynamic settings h yes 127 Or set the input data String integerCacheHighPropValue = // The method is by passing a key, Get the value set manually at startup VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { h = Math.max(parseInt(integerCacheHighPropValue), 127); // // public static int max(int a, int b) { // return (a >= b) ? a : b; // } // Maximum array size is Integer.MAX_VALUE //32 Bit system 2147483647=2^32 h = Math.min(h, Integer.MAX_VALUE - (-low) -1); } catch( NumberFormatException nfe) { // If the property cannot be parsed into an int, ignore it. } } // find high The value of the property is determined by h Local attribute assignment high = h; // Load IntegerCache.archivedCache from archive, if possible VM.initializeFromArchive(IntegerCache.class); int size = (high - low) + 1;// Can be saved 256 Number . // As for why 256? I'm not going to talk about , Suggest yourself to search the computer storage data related concepts ! // Use the archived cache if it exists and is large enough.........
版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢
边栏推荐
- Eight ways to optimize if else code
- Flink从入门到真香(7、Sink数据输出-文件)
- 3、 The parameters of the function
- 浅谈OpenGL之DSA
- DeepMind 最新论文解读:首次提出离散概率树中的因果推理算法
- 10 common software architecture patterns
- This year's salary is 35W +! Why is the salary of Internet companies getting higher and higher?
- Apache Kylin远程代码执行漏洞复现(CVE-2020-1956)
- GopherChina 2020大会
- 2020-11-05
猜你喜欢
Share the experience of passing the PMP examination
新型存算一体芯片诞生,利好人工智能应用~
擅长To C的腾讯,如何借腾讯云在这几个行业云市场占有率第一?
Ali tear off the e-commerce label
浅谈,盘点历史上有哪些著名的电脑病毒,80%的人都不知道!
C++的那些事儿:从电饭煲到火箭,C++无处不在
模板引擎的整理归纳
Recurrence of Apache kylin Remote Code Execution Vulnerability (cve-2020-1956)
“他,程序猿,35岁,被劝退”:不要只懂代码,会说话,胜过10倍默默努力
【Python 1-6】Python教程之——数字
随机推荐
阿里云视频云技术专家 LVS 演讲全文:《“云端一体”的智能媒体生产制作演进之路》
漫画:寻找股票买入卖出的最佳时机(整合版)
阿里撕下电商标签
DeepMind 最新论文解读:首次提出离散概率树中的因果推理算法
一文读懂机器学习“数据中毒”
How to cooperate with people in software development? |Daily anecdotes
关于update操作并发问题
LeanCloud 十月变化
Or talk No.19 | Facebook Dr. Tian Yuandong: black box optimization of hidden action set based on Monte Carlo tree search
Elasticsearch 学习一(基础入门).
This time Kwai tiktok is faster than shaking.
Returning to the third place in the world, what did Xiaomi do right?
Flink from introduction to Zhenxiang (10. Sink data output elasticsearch)
Golang 系统ping程序探测存活主机(任意权限)
wanxin finance
Golang ICMP Protocol detects viable hosts
构建者模式(Builder pattern)
基于阿里云日志服务快速打造简版业务监控看板
I used Python to find out all the people who deleted my wechat and deleted them automatically
应届生年薪35w+ !倒挂老员工,互联网大厂薪资为何越来越高?