Computer Program Efficiency Optimizing Best Practice

1 min read Original article ↗

@ssskip

  • Select an option

  • Save ssskip/a58141d49adacaf37e25a3fb2243640b to your computer and use it in GitHub Desktop.

Select an option

Save ssskip/a58141d49adacaf37e25a3fb2243640b to your computer and use it in GitHub Desktop.

Computer Program Efficiency Optimizing Best Practice

Computer Program Efficiency Optimizing Best Practice.

Why Do?

  • High impact, High value if fixed.
  • Valid, Required functionality
  • We can set reasonable efficiency
  • Nothing more important

Rules

  • Reduce
  • Reuse
  • Recycle

How

  • Test
  • Fix
  • Benchmark
  • Optimize

Memorize Common Patterns

  • Pre-allocations
  • Array reuse
  • Caching
  • Signleflight
  • Locking
  • ...