Skip to content

Instantly share code, notes, and snippets.

@ssskip
Last active February 16, 2022 08:31
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
  • ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment