In this video, the author helps you understand the memory layout of lists. Learn how to optimize list insertion, as well as how to sort them, and use lookups to retrieve information.
- [Instructor] Now let me talk briefly…about algorithm complexity.…So far, we've discussed how we can optimize…the implementation of an algorithm,…for instance, by having NumPy or Numba…do complex arithmetics when we compute the Mandelbrot set…instead of doing it in pure Python,…where every individual operation is slower.…But in some cases, there are different algorithms…to obtain the same outcome, and these algorithms…use a different number of operations.…The classic examples are algorithms to sort a list.…
A simple insertion sort, grow a sorted list of elements…by inserting them one by one in the right spot,…requires a number of operations proportional…to n squared, where n is the size of the list.…Whereas smarter algorithms, such as quicksort,…require a number of operations proportional…to n times the logarithm of n.…One says that the algorithm's running time,…O(n squared) and O(n log n), respectively.…
This is a big topic, but one that you should be mindful of,…and research if needed to improve your code.…
- Designing efficient loops
- Exploiting Python collections
- Writing Pythonic code
- Choosing the best libraries for your tasks
- Downloading webpages with requests
- Parsing HTML with Beautiful Soup
- Manipulating images with Pillow
- Making videos and drawing on maps with matplotlib
- Serving webpages with Jinja2 and Flask
- Working with Python classes
- Taking advantage of functional techniques
- Profiling CPU and memory use
- Exploiting parallelism
Skill Level Intermediate
Learning Python Web Penetration Testingwith Christian Martorella2h 49m Intermediate
1. Installation and Setup
Jupyter notebooks3m 19s
2. Writing Python Efficiently
3. Exploiting Python Libraries
4. Advanced: Python Object-Oriented and Functional Programming
5. Introduction to Performance Optimization in Python
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.