当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- [Python 1-6] Python tutorial 1 -- number
- 京东落地DevOps平台时爆发的冲突如何解决?
- 软件开发中如何与人协作? | 每日趣闻
- 重返全球第三,小米做对了什么?
- Rabbitmq (1) - basic introduction
- 10个常见的软件架构模式
- 金融领域首个开源中文BERT预训练模型,熵简科技推出FinBERT 1.0
- 新型存算一体芯片诞生,利好人工智能应用~
- Alibaba cloud accelerates its growth and further consolidates its leading edge
- Dev-c++在windows环境下无法debug(调试)的解决方案
猜你喜欢
Builder pattern
Talking about, check the history of which famous computer viruses, 80% of the people do not know!
Gopherchina 2020 Conference
Python基础语法
Tencent, which is good at to C, how to take advantage of Tencent's cloud market share in these industries?
我用 Python 找出了删除我微信的所有人并将他们自动化删除了
用 Python 写出来的进度条,竟如此美妙~
Arduino IDE搭建ESP8266开发环境,文件下载过慢解决方法 | ESP-01制作WiFi开关教程,改造宿舍灯
Is there no way out for older programmers?
android基础-CheckBox(复选框)
随机推荐
The first open source Chinese Bert pre training model in the financial field
How to solve the difference between NAT IP and port IP
AI周报:允许“员工自愿降薪”;公司回应:员工内心高兴满意;虎牙HR将员工抬出公司;瑞典禁用华为中兴5G设备
On monotonous stack
3、 The parameters of the function
Get PMP certificate at 51CTO College
2035 we will build such a country
我用 Python 找出了删除我微信的所有人并将他们自动化删除了
wanxin finance
我们做了一个医疗版MNIST数据集,发现常见AutoML算法没那么好用
Q & A and book giving activities of harbor project experts
Dev-c++在windows环境下无法debug(调试)的解决方案
Elasticsearch learning one (basic introduction)
【Python 1-6】Python教程之——数字
Xiaoqingtai officially set foot on the third day of no return
原创 | 数据资产确权浅议
啥是数据库范式
Golang ICMP协议探测存活主机
2020-11-05
.NET 大数据量并发解决方案