diff --git a/README.md b/README.md index c496494..29e1abb 100644 --- a/README.md +++ b/README.md @@ -982,15 +982,6 @@ from collections import deque ``` -Hashlib -------- -```python ->>> import hashlib ->>> hashlib.md5(.encode()).hexdigest() -'33d0eba106da4d3ebca17fcd3f4c3d77' -``` - - Threading --------- ```python @@ -1014,6 +1005,15 @@ lock.release() ``` +Hashlib +------- +```python +>>> import hashlib +>>> hashlib.md5(.encode()).hexdigest() +'33d0eba106da4d3ebca17fcd3f4c3d77' +``` + + Itertools --------- **Every function returns an iterator and can accept any collection and/or iterator. If you want to print the iterator, you need to pass it to the list() function!** @@ -1520,11 +1520,19 @@ Profile ### Basic ```python from time import time -start_time = time() +start_time = time() # Seconds since Epoch. ... duration = time() - start_time ``` +### High Performance +```python +from time import perf_counter as pc +start_time = pc() # Seconds since restart. +... +duration = pc() - start_time +``` + ### Timing a Snippet ```python from timeit import timeit