首页 > 其他分享 >CS:APP--Chapter05 : optimizing program performance (part 2)

CS:APP--Chapter05 : optimizing program performance (part 2)

时间:2023-01-12 03:55:05浏览次数:35  
标签:optimizing -- APP program CS performance

CS: APP--Chapter05: optimizing program performance (part 2)

标签(空格分隔): CS:APP

目录


8. loop uprolling

Without further ado, one sentence concludes what it is :

Loop uprolling reduces the number of overall iterations by increasing the number of elements computed on each iteration.

此处输入图片的描述

此处输入图片的描述

The result of gauging its performance reveals that it is closer to the latency bounds. One thing highlighted here is also latency bounds because the number of iterations also is n, But the idea of parallelism just hits these bounds.

9. enhancing parallelism

The modern processor allows multiple operations of same type to be executed simultaneously, denoted by capacity.

what we are going to do is break the data dependency and get performance better than the latency bounds.

9.1 multiple accumulators

In the I7 core processor, it provides two function units for float multiplication. We can take full advantage of them to execute two float multiplication simultaneously.

此处输入图片的描述
此处输入图片的描述

One knowledge point emphasized here: float arithmetic operations are not in accordance with associative and communitive law.

标签:optimizing,--,APP,program,CS,performance
From: https://www.cnblogs.com/UQ-44636346/p/17045324.html

相关文章

  • Leaflet.js | 官方控件Control
    1、比例控件一个简单的比例控件,以公制(m/km)和英制(mi/ft)系统显示当前屏幕中心的比例,可扩展。使用示例L.control.scale().addTo(map);创造构造描述L.contr......
  • 什么是Http? http和https的区别
    一、HTTPHTTP (HyperTextTransferProtocol),即超文本运输协议,是实现网络通信的一种规范在计算机和网络世界有,存在不同的协议,如广播协议、寻址协议、路由协议等等...........
  • strapi系列-如何创建一个定时任务-Cron Jobs
    Cron是什么?Cron有多种用途。CronJobs用于安排服务器上的任务运行。它们最常用于自动化系统管理或维护。然而,它们也与Web应用程序的构建相关。Web应用程序可能需......
  • RHEL9手动安装MySQL5.7.8
    手动安装便于后期维护,并且更加通用本文记录安装过程和遇到问题,仅供复习和参考,有问题欢迎指正新建MySQL目录mkdir/app/mysql5.7.8#主程序目录mkdir/data/mysql#数......
  • C#、TS和Dart对比2:变量和作用域
    一、变量的声明、赋值和类型推断1、C#//C#是完全面向对象语言,所有代码都必须在类中//Program类的Main方法,是程序的入口函数publicclassProgram{staticvoidM......
  • strapi系列-如何去除接口里的attributes以及 data key,配置关联数据等
    我们先来创建一个接口,然后看一下正常接口返回的数据格式是什么样子创建表以及字段添加一条数据配置接口权限我暂时给了这个接口PUBLIC权限,用来测试使用postman进......
  • JSTL
    1.概念:JavaServerPageTagLibraryJSP标准标签库  *是由apache组织提供的开源的免费的jsp标签2.作用:用于简化和替换jsp页面上的java代码3.使用步骤:  1.导入jstl......
  • 问题盘点|使用 Prometheus 监控 Kafka,我们该关注哪些指标
    作者:阿里云可观测Kafka作为当前广泛使用的中间件产品,承担了重要/核心业务数据流转,其稳定运行关乎整个业务系统可用性。本文旨在分享阿里云Prometheus在阿里云Kafka......
  • Luogu P5465 [PKUSC2018] 星际穿越
    观察可以发现一个结论,可以视作每个点\(i\)可以一步到达\(l_i\simn\)的每一个点。发现对于\(a<b<x\),\(dist(a,x)\gedist(b,x)\)第一步是相当特殊的,因为第一步......
  • 容器服务与达摩院合作 AHPA 获 AAAI 2023 IAAI人工智能创新应用奖
    作者:阿里云容器服务近日,阿里云容器服务ACK与达摩院数据决策团队合作的论文《AHPA:AdaptiveHorizontalPodAutoscalingSystemsonAlibabaCloudContainerService......