Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low Hanging Fruit (aka obvious stuff) #15

Open
Robadob opened this issue Jan 31, 2024 · 1 comment
Open

Low Hanging Fruit (aka obvious stuff) #15

Robadob opened this issue Jan 31, 2024 · 1 comment

Comments

@Robadob
Copy link
Member

Robadob commented Jan 31, 2024

When you begin writing code, and the plan changes half way through it's easy for bottlenecks that weren't previously a problem to appear. These can be recognised and easily addressed, they mostly revolve around redundant repetition.

  • Repeating the same operation to calculate a value every iteration of a loop (move the operation outside the loop so that it's performed once)
  • Regularly calling a function that performs an expensive operation to return a predictable result (cache results, LRU cache decorator).
  • Reading the same file from disk multiple times (read it once and cache it in memory).
  • ??
@Robadob
Copy link
Member Author

Robadob commented Feb 8, 2024

Worth using the applicable items from the COM4521 lecture 2b.

Call it first steps or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant