栏目分类:
子分类:
返回
文库吧用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
文库吧 > IT > 软件开发 > 后端开发 > Java

图灵学院四期五期java架构师课堂笔记

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

图灵学院四期五期java架构师课堂笔记

缓存是指可以进行高速数据交换的存储器,它先于内存与CPU交换数据,因此速率很快。L1 Cache(一级缓存)是CPU第一层高速缓存。内置的L1高速缓存的容量和结构对CPU的性能影响较大,不过高速缓冲存储器均由静态RAM组成,结构较复杂,在CPU管芯面积不能太大的情况下,L1级高速缓存的容量不可能做得太大。一般L1缓存的容量通常在32—256KB。L2 Cache(二级缓存)是CPU的第二层高速缓存,分内部和外部两种芯片。内部的芯片二级缓存运行速率与主频相同,而外部的二级缓存则只有主频的一半。L2高速缓存容量也会影响CPU的性能,原则是越大越好,普通台式机CPU的L2缓存一般为128KB到2MB或者更高,笔记本、服务器和工作站上用CPU的L2高速缓存最高可达1MB-3MB。由于高速缓存的速度越高价格也越贵,故有的计算机系统中设置了两级或多级高速缓存。紧靠内存的一级高速缓存的速度最高,而容量最小,二级高速缓存的容量稍大,速度也稍低 [1] 。

缓存只是内存中少部分数据的复制品,所以CPU到缓存中寻找数据时,也会出现找不到的情况(因为这些数据没有从内存复制到缓存中去),这时CPU还是会到内存中去找数据,这样系统的速率就慢下来了,不过CPU会把这些数据复制到缓存中去,以便下一次不要再到内存中去取。随着时间的变化,被访问得最频繁的数据不是一成不变的,也就是说,刚才还不频繁的数据,此时已经需要被频繁的访
public class CommonUtils {
public static List> getHotKeywordList(String hotKeyword){
List> hotKeywordList=new ArrayList<>();
Arrays.asList(hotKeyword.split(" ")).forEach(e->{
Map hotKeywordInfo=new HashMap<>();
hotKeywordInfo.put(“hotKeyword”,e);
try {
hotKeywordInfo.put(“hotKeywordBM”, URLEncoder.encode(e,“UTF-8”));
} catch (UnsupportedEncodingException unsupportedEncodingException) {
hotKeywordInfo.put(“hotKeywordBM”,e);
}
hotKeywordList.add(hotKeywordInfo);
});
return hotKeywordList;
}
public static Map getPageList(IPage page){
Map info =new HashMap<>();
List tou=new ArrayList<>();
List zhon=new ArrayList<>();
List wei=new ArrayList<>();
long current = page.getCurrent();
long pages = page.getPages()==0?1:page.getPages();
if(current>6){
tou.add(1L);
tou.add(2L);
}
if(current<=pages-6){
wei.add(pages-1);
wei.add(pages);
}
if(tou.size()!=0 && wei.size()!=0){
zhon.add(current-3);
zhon.add(current-2);
zhon.add(current-1);
zhon.add(current);
zhon.add(current+1);
zhon.add(current+2);
zhon.add(current+3);
}else if(tou.size()!=0){
for(long i=pages-8;i<=pages;i++){
zhon.add(i);
}
}else if(wei.size()!=0){
for(long i=1;i<=8;i++){
zhon.add(i);
}
}else{
for(long i=1;i<=pages;i++){
zhon.add(i);
}
}
info.put(“tou”,tou);
info.put(“zhon”,zhon);
info.put(“wei”,wei);
return info;
}
}


图灵学院四期五期java架构师
pan.baidu.com/s/171cVFkMGADE97-0Nre_m1Q?pwd=0rrm
pan.baidu.com/s/1437eAygHU_TTMhVyOcjyjg?pwd=os0o

转载请注明:文章转载自 www.wk8.com.cn
本文地址:https://www.wk8.com.cn/it/1039431.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 wk8.com.cn

ICP备案号:晋ICP备2021003244-6号