欢迎来到天天文库
浏览记录
ID:56437783
大小:183.50 KB
页数:25页
时间:2020-06-18
《软件调优基础.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、软件调优基础陈健2003/3为什么需要调优?相同的代码>>不同的性能SELFRELEASEOPT:4IMSLCXMLATLASMKL50MKL5116.676s5.445s5.457s10.996s3.328s0.762s0.848s0.738sfor(i=0;i2、][j];}}}目标明确性能调优的主要任务定义一些重要的性能调优术语利用Intel工具提供帮助AgendaPerformanceCycleOverviewThePerformanceCycleWhentoStartPerformanceGainsWhentoStopPuttingitintoPerspectivePerformanceCycleDetailsSummary调优循环分析数据并得出结论测试结果修改代码实现优化确定修改方法来解决问题从这里开始收集性能数据When(why)toStartUserRequirement?SoftwareVendorRequirement?PutPerf3、ormanceRequirementintotheRequirementsDocumentPerformanceshouldbeconsideredateverystageoftheproductlifecycle(RequirementsGathering,Design,andTesting)Exception:Do“codetuning”afterthesimple/readablenon-optimizedversionoftheapplicationexists.工作vs.效果WhentoStopArchitectureisatMaximumEfficiency?Besureyou4、knowwhatthisis:CalculateTheoreticalMaximumPerformanceRequirementissatisfiedIncrementallydoWideMeshOptimizations2untildone调优原则Weshouldforgetaboutsmallefficiencies,sayabout97%ofthetime:prematureoptimizationistherootofallevil.DonaldKnuthQualityCodeis:PortableReadableMaintainableReliableIntelligentlySa5、crificeQualityforPerformanceAgendaPerformanceCycleOverviewPerformanceCycleDetailsGatherPerformanceDataAnalyzeDataandIdentifyIssuesGenerateAlternativestoResolveIssuesImplementEnhancementsSummary收集性能数据TimerUsetogetwallclocktimeAccuracy,LowOverheadUseIntel®VTune™PerformanceAnalyzerProfiler:GatherInfor6、mationaboutCodeUsagePerformanceMonitor:GatherInformationaboutSystemResourceUsage工作量Agoodworkloadshouldhavethesecharacteristics:measurablereproduciblestaticrepresentative分析数据得出结论BaselineCurrentPerformanceExamineHotSpotsIdentifyBottlenecksCalculatePotentialMaximumPerformanceExamineHotSpotsTheParetoPr7、inciple,a.k.a.the80/20RuleConcentrateonthevitalfewvs.thetrivialmanyHotSpot:应用或系统中占主要运算量的部分GenerallyconsistsofaLoopForApplicationsthatdon’thavehotspots,examine:MemoryLayoutExceptionsEffectiveCompilerUsage额外内
2、][j];}}}目标明确性能调优的主要任务定义一些重要的性能调优术语利用Intel工具提供帮助AgendaPerformanceCycleOverviewThePerformanceCycleWhentoStartPerformanceGainsWhentoStopPuttingitintoPerspectivePerformanceCycleDetailsSummary调优循环分析数据并得出结论测试结果修改代码实现优化确定修改方法来解决问题从这里开始收集性能数据When(why)toStartUserRequirement?SoftwareVendorRequirement?PutPerf
3、ormanceRequirementintotheRequirementsDocumentPerformanceshouldbeconsideredateverystageoftheproductlifecycle(RequirementsGathering,Design,andTesting)Exception:Do“codetuning”afterthesimple/readablenon-optimizedversionoftheapplicationexists.工作vs.效果WhentoStopArchitectureisatMaximumEfficiency?Besureyou
4、knowwhatthisis:CalculateTheoreticalMaximumPerformanceRequirementissatisfiedIncrementallydoWideMeshOptimizations2untildone调优原则Weshouldforgetaboutsmallefficiencies,sayabout97%ofthetime:prematureoptimizationistherootofallevil.DonaldKnuthQualityCodeis:PortableReadableMaintainableReliableIntelligentlySa
5、crificeQualityforPerformanceAgendaPerformanceCycleOverviewPerformanceCycleDetailsGatherPerformanceDataAnalyzeDataandIdentifyIssuesGenerateAlternativestoResolveIssuesImplementEnhancementsSummary收集性能数据TimerUsetogetwallclocktimeAccuracy,LowOverheadUseIntel®VTune™PerformanceAnalyzerProfiler:GatherInfor
6、mationaboutCodeUsagePerformanceMonitor:GatherInformationaboutSystemResourceUsage工作量Agoodworkloadshouldhavethesecharacteristics:measurablereproduciblestaticrepresentative分析数据得出结论BaselineCurrentPerformanceExamineHotSpotsIdentifyBottlenecksCalculatePotentialMaximumPerformanceExamineHotSpotsTheParetoPr
7、inciple,a.k.a.the80/20RuleConcentrateonthevitalfewvs.thetrivialmanyHotSpot:应用或系统中占主要运算量的部分GenerallyconsistsofaLoopForApplicationsthatdon’thavehotspots,examine:MemoryLayoutExceptionsEffectiveCompilerUsage额外内
此文档下载收益归作者所有