Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

The Missing Python Introduction for Scientists - Performance and Efficiency

NHR@FAU via YouTube

Overview

Discover the intricacies of Python for scientific computing in this 43-minute talk by Tamás Gál at the NHR@FAU HPC Cafe. Explore Python's internals, understand its popularity among scientists, and learn why libraries like NumPy, Pandas, and Numba are crucial for efficient scientific coding. Gain insights into writing scalable code, optimizing performance, and addressing common issues when dealing with large datasets. Delve into topics such as CPython, bytecode, memory management, the Global Interpreter Lock, and performance comparisons. Learn about structuring code with classes, leveraging NumPy's ndarray, and utilizing tools like Numexpr and Numba JIT for improved efficiency. Acquire the knowledge to choose the right tools and languages for scientific computing tasks, and consider the importance of green coding practices.

Syllabus

Intro
THE PYTHON PROGRAMMING LANGUAGE
POPULAR LANGUAGES
PERFORMANCE OF LANGUAGES
CPYTHON
FROM SOURCE TO RUNTIME
PYTHON BYTECODE print(5 is 7 - 2, 300 is 3022)
THE TYPE OF A PyObject
DATA IN PYTHON
YOUR BEST FRIEND AND WORST ENEMY: GIL-Global Interpreter Lock
THREADS AND CPU BOUND TASKS
A DUMB SPEED COMPARISON Calculating the mean of 1000000 randomly generated numbers.
CLASSES TO STRUCTURE CODE
STRUCT OF ARRAYS VS ARRAY OF STRUCTS
NUMPY: ndarray
"HIDDEN" ALLOCATIONS
AVOIDING UNNEEDED ALLOCATIONS
MEMORY AND PERFORMANCE PROBLEMS
MASKING/SLICING IS THE ROOT OF ALL EVIL
NUMEXPR USAGE EXAMPLE
NUMEXPR SPEED-UP
NUMEXPR-SUPPORTED OPERATORS
NUMEXPR - SUPPORTED FUNCTIONS
AWKARD ARRAY
NUMBA JIT-EXAMPLE
CHOOSE YOUR TOOLS WITH CARE
PERSONAL REMARK
A FINAL WORD ON GREEN CODING/COMPUTING

Taught by

NHR@FAU

Reviews

Start your review of The Missing Python Introduction for Scientists - Performance and Efficiency

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.