- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
NumPy: How Python Gets C Speed
NumPy isn't really Python. It's a thin Python layer over a C core.
A Python for-loop summing 100 million numbers takes 92 seconds. `np.arange(100_000_000).sum()` finishes in a third of a second — 300× faster, using the same Python you just wrote. Where did the speed come from? Python didn't suddenly get fast. The loop moved into C.
→ Why a Python list is a pointer chase and an ndarray is a wall of bytes
→ What a ufunc actually is, and why `arr + arr` becomes ONE C function call, not a million
→ How NumPy ships hand-tuned SIMD kernels (SSE, AVX, NEON) for every modern CPU
→ The stride trick: why `arr[::2]` doesn't copy — and why broadcasting is literally `stride = 0`
→ The "Python mask over C" pattern that powers pandas, PyTorch, scikit-learn
By the end, that one-line `.sum()` is the least mysterious thing in your data science stack.
Previous video (recommended first): "Why Python Is 100x Slower Than C"
Chapters:
0:00 Intro
0:02 The puzzle — one line, 80× faster
0:38 Bytes, not objects — the memory layout trick
1:33 Ufuncs — one call, one C loop
2:37 Strides — slicing without copying
3:30 The Python mask over C
4:19 Outro
References:
→ Harris et al. "Array programming with NumPy" (Nature 2020) — https://www.nature.com/articles/s41586-020-2649-2
→ NumPy official internals docs — https://numpy.org/doc/stable/reference/internals.html
#Python #NumPy #DataScience
Видео NumPy: How Python Gets C Speed канала Neural Download
A Python for-loop summing 100 million numbers takes 92 seconds. `np.arange(100_000_000).sum()` finishes in a third of a second — 300× faster, using the same Python you just wrote. Where did the speed come from? Python didn't suddenly get fast. The loop moved into C.
→ Why a Python list is a pointer chase and an ndarray is a wall of bytes
→ What a ufunc actually is, and why `arr + arr` becomes ONE C function call, not a million
→ How NumPy ships hand-tuned SIMD kernels (SSE, AVX, NEON) for every modern CPU
→ The stride trick: why `arr[::2]` doesn't copy — and why broadcasting is literally `stride = 0`
→ The "Python mask over C" pattern that powers pandas, PyTorch, scikit-learn
By the end, that one-line `.sum()` is the least mysterious thing in your data science stack.
Previous video (recommended first): "Why Python Is 100x Slower Than C"
Chapters:
0:00 Intro
0:02 The puzzle — one line, 80× faster
0:38 Bytes, not objects — the memory layout trick
1:33 Ufuncs — one call, one C loop
2:37 Strides — slicing without copying
3:30 The Python mask over C
4:19 Outro
References:
→ Harris et al. "Array programming with NumPy" (Nature 2020) — https://www.nature.com/articles/s41586-020-2649-2
→ NumPy official internals docs — https://numpy.org/doc/stable/reference/internals.html
#Python #NumPy #DataScience
Видео NumPy: How Python Gets C Speed канала Neural Download
Комментарии отсутствуют
Информация о видео
19 апреля 2026 г. 8:59:52
00:04:41
Другие видео канала





















