software performance for scientific minds

Post on 22-Jan-2018

159 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Rinse andRepeat

Simple rules toapply to keepyour softwareefficient

fasterCodeSoftware

Performancefor

ScientificMinds

More output inless time

Analyze before optimizing

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

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

Fix the right problem first

Optimize I/O Balance work

Optimizecommunication

Improve memoryaccess patterns

Vectorize theloops

Add threading

Follow the Performance Pathway

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

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

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

Vigilance and testingpreserves wins

#3

Top Tips to TakeHome

Optimize the problemsin sequence

#2

Analyze theperformance first

#1

top related