From the course: Python: Programming Efficiently
Unlock the full course today
Join today to access over 23,300 courses taught by industry experts.
Time profiling - Python Tutorial
From the course: Python: Programming Efficiently
Time profiling
- [Instructor] Let us experiment with time profiling by computing the Mandelbrot set, perhaps the most famous fractal in popular culture. Let me explain first how the set turns a mathematical equation into a striking picture. Complex numbers can be identified with points in the plane. The real part is the x-coordinate and the imaginary part is the y-coordinate. These numbers come with special rules for addition and multiplication. The Mandelbrot set is actually the black area in the blot, which consists of all the complex numbers, C, such that if we keep iterating the computation, Z equals Z squared plus C, the resulting X never escapes to infinity. If X does run away, we color the corresponding point using a number of iterations that it took to escape. To determine that, we use a simple rule. If Z gets a distance larger than two from the origin, it's guaranteed to escape, so that's what we'll check for. Since our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Computer architecture and optimization techniques1m 38s
-
(Locked)
Time profiling8m 19s
-
(Locked)
Memory profiling6m 42s
-
(Locked)
Algorithm complexity3m 24s
-
(Locked)
Introduction to parallel programming3m 49s
-
(Locked)
Challenge: Inverted index2m 18s
-
(Locked)
Solution: Inverted index1m 39s
-
(Locked)
-