Skip to content

Commit 6860518

Browse files
committed
Add hyper-link for Item 58: Profile before optimizing
1 parent c5b051c commit 6860518

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,14 @@ Python 3.
582582
execution.
583583

584584

585-
### []()
586-
585+
### [item 58: Profile before optimizing](item_58_profile_before_optimizing.py)
586+
- 1. It's import to profile Python programs before optimizing because the
587+
source of slowdowns is often obscure.
588+
- 2. Use the cProfile module instead of the profile module because it provides
589+
more accurate profiling information.
590+
- 3. The Profile object's runcall method provides everything you need to
591+
profile a tree of function calls in isolation.
592+
- 4. The Stats object lets you select and print the subset of profiling
593+
information you need to see to understand your program's performance.
587594

588595
### []()

0 commit comments

Comments
 (0)