当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- The birth of a new integrated memory and computing chip is conducive to the application of artificial intelligence~
- Major changes in Huawei's cloud: Cloud & AI rises to Huawei's fourth largest BG with full fire
- AI周报:允许“员工自愿降薪”;公司回应:员工内心高兴满意;虎牙HR将员工抬出公司;瑞典禁用华为中兴5G设备
- 我用 Python 找出了删除我微信的所有人并将他们自动化删除了
- laravel8更新之速率限制改进
- 区块链周报:数字货币发展写入十四五规划;拜登邀请MIT数字货币计划高级顾问加入总统过渡团队;委内瑞拉推出国营加密交易所
- C++的那些事儿:从电饭煲到火箭,C++无处不在
- 基于阿里云日志服务快速打造简版业务监控看板
- GopherChina 2020大会
- Python basic syntax
猜你喜欢

Gopherchina 2020 Conference

模板引擎的整理归纳

Essential for back-end programmers: distributed transaction Basics

Improvement of maintenance mode of laravel8 update

DeepMind 最新论文解读:首次提出离散概率树中的因果推理算法

Returning to the third place in the world, what did Xiaomi do right?

Millet and oppo continue to soar in the European market, and Xiaomi is even closer to apple

GopherChina 2020大会

Get PMP certificate at 51CTO College

On the software of express delivery cabinet and deposit cabinet under Windows
随机推荐
STM32CubeIDE下载安装-GPIO基本配置操作-Debug调试(基于CMSIS DAP Debug)
On the confirmation of original data assets
AQS analysis
Arduino ide build esp8266 development environment, slow file download solution | esp-01 make WiFi switch tutorial, transform dormitory lights
PMP experience sharing
Shell uses. Net objects to send mail
模板引擎的整理归纳
Flink从入门到真香(6、Flink实现UDF函数-实现更细粒度的控制流)
Or talk No.19 | Facebook Dr. Tian Yuandong: black box optimization of hidden action set based on Monte Carlo tree search
基于阿里云日志服务快速打造简版业务监控看板
rabbitmq(一)-基础入门
The birth of a new integrated memory and computing chip is conducive to the application of artificial intelligence~
重返全球第三,小米做对了什么?
“他,程序猿,35岁,被劝退”:不要只懂代码,会说话,胜过10倍默默努力
C++的那些事儿:从电饭煲到火箭,C++无处不在
用 Python 写出来的进度条,竟如此美妙~
适合c/c++新手学习的一些项目,别给我错过了!
Implementation of verification code recognition in Python opencv pytesseract
Leancloud changes in October
Build simple business monitoring Kanban based on Alibaba cloud log service