In this video, learn about time profiling using cProfile and line_profiler.
- [Instructor] In this video, I will show you how you can…profile your code to identify which functions…and lines are the most expensive…and are the first candidates for optimization.…I will also show you that for mathematical operations…repeated over large loops, the numpy library…offers very significant performance gains…with little programming effort.…In this example we're going to draw the Mandelbrot set,…perhaps the most famous factor in popular culture.…The Mandelbrot set has many surprising mathematical…properties which we will not get into…but it also makes for beautiful pictures.…
Let me quickly explain how we make such a picture.…Complex number can be identified with points in the plane…where the real part of the number is the Xcode…in the imaginary part, prefixed by i is the y-coordinate.…These numbers have special rules of addition…and multiplication which make a lot of sense mathematically,…but which I won't describe here.…The Mandelbrot set, the black area in the plot,…consists of all the complex numbers c,…
- 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
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.