Profiling
Exercises
Dataframe Storage
Compare the performance of list-of-dicts vs. dict-of-lists representation of dataframes for filtering and aggregation. Which representation is better, and how does the answer depend on exactly what question you ask?
Instrumentation
Write a program in Python that:
-
parses a single-file program containing function definitions (but not classes with methods);
-
replaces each function with a version of itself that records the start and end time of each invocation; and
-
saves the execution times for each function to a file when the program terminates.