Improving Performance - Optimizing code
- Problems
- Optimization strategy
- Locate the source of the problem
- Optimizing tactics
- DSU: Decorate Sort Undecorate
- Profile code
- Slow example
- profile slow code
- cProfile slow code
- Benchmarking
- Benchmarking subs
- Counting words - which implementation is faster?
- for loop or reduce to add numbers?
- Levenshtein distance
- Generate words
- Levenshtein - pylev
- Levenshtein - editdistance
- Editdistance benchmark
- A Tool to Generate text files
- Count characters
- Memory leak
- Garbage collection
- Weak reference
- Exercise: benchmark list-comprehension, map, for
- Exercise: Benchmark Levenshtein
- Exercise: sort files
- Exercise: compare split words:
- Exercise: count words