8
Rinse and Repeat Simple rules to apply to keep your software efficient faster Code Software Performance for Scientific Minds More output in less time

Software Performance for Scientific Minds

Embed Size (px)

Citation preview

Page 1: Software Performance for Scientific Minds

Rinse andRepeat

Simple rules toapply to keepyour softwareefficient

fasterCodeSoftware

Performancefor

ScientificMinds

More output inless time

Page 2: Software Performance for Scientific Minds

Analyze before optimizing

"Premature optimization is the root of all evil"Donald Knuth, 1974

Page 3: Software Performance for Scientific Minds

Measure Everything

Measure and analyze every aspect of performancePrefer representative workloads over artificial tests

Repeatabilityis key:

automate forbest results

Tip

See: Allinea Performance ReportsKeep a snapshot of initial performance

Track progress

Page 4: Software Performance for Scientific Minds

Fix the right problem first

Optimize I/O Balance work

Optimizecommunication

Improve memoryaccess patterns

Vectorize theloops

Add threading

Follow the Performance Pathway

Page 5: Software Performance for Scientific Minds

When all you have is a hammer

Everything looks like a nail

CPU tuning toolsdon't fix I/O or

communication -and vice-versa

Tip

Be wise in your choice of tool

Ensure you can see the whole pathway - from I/O andcommunication right through to the CPU

Page 6: Software Performance for Scientific Minds

Profiling finds the "where"

Fix the root causeProfilers highlight the hot spot fortime on the performance pathway

Re-run and re-profileAlways confirm changes have

improved the performance

Find the time sinkProfilers show the functions, sourcelines and phases that cost the most

For every problem on the performance pathway

See: The Allinea MAP profiler

Page 7: Software Performance for Scientific Minds

Preserve your wins

Save and document itStore everything - make your workrepeatable

Share the progressLet others know what performanceshould be and how to get it

Protect the codeLink performance with ContinuousIntegration and testing

Page 8: Software Performance for Scientific Minds

Vigilance and testingpreserves wins

#3

Top Tips to TakeHome

Optimize the problemsin sequence

#2

Analyze theperformance first

#1