Skip to content

Instantly share code, notes, and snippets.

@ssskip
Last active February 16, 2022 08:31
Show Gist options
  • Save ssskip/a58141d49adacaf37e25a3fb2243640b to your computer and use it in GitHub Desktop.
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
  • ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment