Перейти к содержимому

ByteVibe — Вайб IT-мира!

ByteVibe — свежие IT-новости, обзоры гаджетов, аналитика технологий и тренды цифрового мира. Будь в курсе главных событий IT-индустрии!

Меню
  • Главная
  • Новости
  • Статьи
Меню
FFmpeg снова шокировал:

FFmpeg снова шокировал: 100-кратный прирост скорости!

Опубликовано на 21.07.2025

Разработчики FFmpeg снова всех уделали! 🔥 Их секрет? Старая добрая ручная оптимизация ассемблера. Оказалось, что хитрый код вручную обходит даже самые продвинутые компиляторы, давая умопомрачительные 100x улучшение производительности для обработки медиа. 🤯 Это не просто апдейт — это технологический рывок, который перезагружает наши представления о возможностях софта. 💡 Видеомонтажеры и стримеры уже потирают руки: рендеринг теперь будет летать! 🚀 Интересно, как долго железо будет успевать за такими оптимизациями? 🤔 #код #оптимизация #gamedev


Software ‘The biggest speedup I’ve seen so far’ — FFmpeg devs boast of another 100x leap thanks to handwritten assembly code News By Mark Tyson published 17 July 2025 But admit this boost is only seen in ‘an obscure filter’. Comments (9) When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works . (Image credit: FFmpeg) The developers behind the FFmpeg project are again claiming major performance uplifts delivered by wielding the art of handwritten assembly code. With the latest patch applied, users should see a “100x speedup” in the cross-platform open-source media transcoding application. However, the developers were soon to clarify that the 100x claim applies to just a single function, “not the whole of FFmpeg.” BREAKING: FFmpeg 100x speedup from handwritten assembly13:55:30 rangedetect8_avx512: 121.2 (100.18x) that may be the biggest speedup I’ve seen so far July 16, 2025 “The biggest speedup I’ve seen so far” Last November, we reported on an FFmpeg performance boost that could speed certain operations by up to 94x . The latest handwritten assembly patch boosts the app’s ‘rangedetect8_avx512’ performance by 100.73%. If your modern processor doesn’t support AVX512, you should still see a 65.63% uplift with the rangedetect8_avx2 code path. Where will you feel these speed increases? In some follow-up tweets, the FFmpeg developers admit that “It’s a single function that’s now 100x faster, not the whole of FFmpeg.” They would later go on to elaborate that the functionality, which might enjoy a 100% speed boost, depending upon your system, was “an obscure filter.” You may like 7-Zip for Windows goes massively parallel with first ‘Threadripper Edition’ — five years after Threadripper debut, Version 25.00 the first to support more than 64 threads New display hits 1 million FPS — display and high-speed camera could enable 1 Tbps speeds AMD’s Threadripper 9995WX stuns in Cinebench R23 — new Ryzen flagship reportedly 73% faster than its predecessor The obscurity of the function means it hadn’t been prioritized by the devs until now. But we also gather that the filter code was recoded using the SIMD (Single Instruction, Multiple Data) processing concept for vastly improved parallel processing on today’s powerful chips. Evidently, compilers – programs that take higher-level language code and spit out assembly (machine) code – are still not competitive with handwritten assembly. Or you could say, “register allocator sucks on compilers,” as FFmpeg tweeted today. (Image credit: FFmpeg) Assembly language evangelicals Harking back to the golden age of home computing in the 1980s and 1990s, where fixed-spec systems had lifecycles measured in half-decades — and strictly limited processing resources — handwritten assembly code optimizations played a larger part in the business of speeding up computers, games, and other software. FFmpeg is perhaps one of the few ‘assembly evangelists’ remaining. The dev team even runs a ‘school.’ Stay On the Cutting Edge: Get the Tom’s Hardware Newsletter Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox. Contact me with news and offers from other Future brands Receive email from us on behalf of our trusted partners or sponsors By submitting your information you agree to the Terms & Conditions and Privacy Policy and are aged 16 or over. FFmpeg tools and libraries run across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, systems, and more. One of the most popular video player software utilities, VLC , uses the libavcodec and libavformat libraries from the FFmpeg project. Follow Tom’s Hardware on Google News to get our up-to-date news, analysis, and reviews in your feeds. Make sure to click the Follow button. TOPICS Open Source See all comments (9) Mark Tyson Social Links Navigation News Editor Mark Tyson is a news editor at Tom’s Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason. Read more 7-Zip for Windows goes massively parallel with first ‘Threadripper Edition’ — five years after Threadripper debut, Version 25.00 the first to support more than 64 threads New display hits 1 million FPS — display and high-speed camera could enable 1 Tbps speeds AMD’s Threadripper 9995WX stuns in Cinebench R23 — new Ryzen flagship reportedly 73% faster than its predecessor Intel driver update for Lunar Lake chips reportedly improves iGPU FPS by 10%, 1% lows by 25% New Lossless Scaling update can reduce GPU load by 2x Enthusiast hacks FSR 4 onto RX 7000 series GPU without official AMD support, returns better quality but slightly lower fps than FSR 3.1 Latest in Software Intel axes Clear Linux, the fastest distribution on the market ‘Cyberpunk 2077’ system requirements revealed for Apple Silicon Macs — M3 Pro recommended for 1080p 60 FPS ‘Cyberpunk 2077’ comes to the Mac July 17 — patient Apple gamers get support for every Apple Silicon chip, new Metal features, and Spatial Audio Windows 7 runs natively on the Steam Deck 7-Zip for Windows goes massively parallel with first ‘Threadripper Edition’ — five years after Threadripper debut, Version 25.00 the first to support more than 64 threads A project to bring CUDA to non-Nvidia GPUs is making major progress Latest in News Microsoft buys more than a billion dollars’ worth of excrement, including human poop, to clean up its AI mess Polish programmer beats OpenAI’s custom AI in 10-hour marathon, wins World Coding Championship Boot exploit for software-bricked Nintendo WII U consoles discovered by repairing destroyed and discarded SD cards from factory GTA 5 finally launches in Saudi Arabia and the UAE 12 years after its global release Intel axes Clear Linux, the fastest distribution on the market PCB reference books with pages made from actual USB-C powered PCBs are now available at $37 each 9 Comments Comment from the forums DS426 Reminds me of the Voxel Space engine used in circa 1993 for the original Comanche PC game that was entirely written in Assembly as it needed to perform well even without GPU acceleration. Reply ex_bubblehead There’s still a lot to be said for hand optimised machine language code. Reply bit_user The article said: Last November, we reported on an FFmpeg performance boost that could speed certain operations by up to 94x. That speedup was reproducible only if you compiled the totally unoptimized, generic C implementation in debug mode. When I tried compiling it in release mode and using clang instead of gcc, I got over 50% as fast as the hand-written assembly, without any changes to the generic C sources. Upon reading the sources, it’s clear that the C could’ve been written more optimally, likely yielding further improvements — and I’m not even talking about using any AVX512 intrinsics! I will be taking a look at this latest patch, when I have a chance. P.S. thanks for actually linking the patch, this time. Last time, the patch wasn’t in ffmpeg, but rather someone posted a slide from a DAV1D presentation on the ffmpeg Twitter account. Took me a while to figure that out. Edit: I just leaned that someone looked into that previous 94x speedup even deeper than I did! Apparently, the SIMD code implemented a 6-tap convolution, whereas the generic C version implemented 8-tap. I’ll bet that accounts for a lot of the difference clang couldn’t close. https://news.ycombinator.com/item?id=42042706Furthermore, they actually reached the original author and got an admission that the comparison was made using C code compiled with optimizations disabled! Reply bit_user ex_bubblehead said: There’s still a lot to be said for hand optimised machine language code. Oh, but they never even tried using C with intrinsics. Whenever they optimize something, they go straight to assembly. So, we don’t even know how well-optimized C compares. In the last thread, someone claimed compilers wouldn’t be smart enough to fuse two separate operations into a single AVX-512 instruction, which I subsequently demonstrated clang/LLVM doing. I’ve been quite impressed by its autovectorization. It won’t restructure your code to be vector-friendly, but it seems to do a good job of more straight-forward vectorization tasks. If I get a chance to fiddle with this patch, I’ll post my findings here. Reply bit_user DS426 said: Reminds me of the Voxel Space engine used in circa 1993 for the original Comanche PC game that was entirely written in Assembly as it needed to perform well even without GPU acceleration. In 1993, compilers weren’t nearly as sophisticated and the first PC 3D graphics accelerator cards didn’t yet exist. Nvidia’s NV1 didn’t launch until May, 1995. Cards based on 3D Labs’ Glint 300SX also showed up about the same time. BTW, I’m sure plenty of other 3D games from that time used assembly language. It wouldn’t surprise me to learn that Wolfenstein and Doom both did. Quake was worked on by the author of the book Zen of Assembly Language . I read his columns in Dr. Dobbs Journal , back in the day, and still have a copy of his book Zen of Code Optimization floating around, somewhere. Reply DS426 bit_user said: In 1993, compilers weren’t nearly as sophisticated and the first PC 3D graphics accelerator cards didn’t yet exist. Nvidia’s NV1 didn’t launch until May, 1995. Cards based on 3D Labs’ Glint 300SX also showed up about the same time. BTW, I’m sure plenty of other 3D games from that time used assembly language. It wouldn’t surprise me to learn that Wolfenstein and Doom both did. Quake was worked on by the author of the book Zen of Assembly Language . I read his columns in Dr. Dobbs Journal , back in the day, and still have a copy of his book Zen of Code Optimization floating around, somewhere. Great point! It sounds wild today but probably wasn’t very rare back then. As for graphics, yep, that design decision makes complete sense (I would say not even a decision as I don’t think there was another feasible option) given the goings-on of that time. Even 3dfx’ Voodoo accelerator didn’t come out commercially until 1996. Reply terabite The writer seems to use 100% and 100x interchangeably. They are not. A 100% uplift is twice the performance, a 100x uplift is 100 times the performance Reply bit_user terabite said: The writer seems to use 100% and 100x interchangeably. They are not. A 100% uplift is twice the performance, a 100x uplift is 100 times the performance Yeah, I noticed that as well. At least the headline matches what the developer claimed. Not my biggest issue with the article, though. I’m trying to put myself in the headspace of an author or a reader who knows little or nothing about software development or code optimization. There are so many questions that should come up, like: whether such performance gains are just waiting to be had in any piece of software written in C? Wouldn’t that seem like a reasonable question to ask, because it’d save everyone having to upgrade their CPUs, if true! And yet, why doesn’t the author pursue that angle? And if not, what’s so special about this code that makes the compiler so horrible at optimizing it? It just strikes me as a rather incurious article. The only thing more confounding than that is the question of why the developer (if they actually believed these numbers), didn’t apparently deem the C code in need of any reworking, since ffmpeg is a cross-platform codebase and doesn’t have assembly language versions of every function for every supported CPU ISA. So, the C version should at least be made decently fast . And if it’s slower by more than an order of magnitude, it should be obvious something is really wrong with it, because an order of magnitude is usually about what you’d get from vectorizing something like this. Reply bit_user I noticed this patch still hadn’t been merged. A quick look at the linked mailing list thread shows why: The developer (Niklas Haas) said: Upon further testing, I realized that this logic (both C and SIMD) overflows for 16-bit inputs. Will fix and resubmit. Source: https://ffmpeg.org/pipermail/ffmpeg-devel/2025-July/346727.html He goes on to say: I also found that the C versions can be made slightly faster by returning out of the inner loop, which generates a shorter scalar version that is faster than the auto-vectorized abomination that was generated before. So, that also suggests why the generic C version performed quite so poorly. He iterated on these patches two more times, so far, yet it still hasn’t been merged. Here’s the latest patch, featuring a speedup of 55x over generic C*: https://ffmpeg.org/pipermail/ffmpeg-devel/2025-July/346786.html

  • I’ve learned that ffmpeg doesn’t enable compiler autovectorization, by default . So, this is comparing AVX-512 (processing up to 64 bytes at a time) vs. serial code that processes only one byte per loop iteration. Considering that, a speedup of 55x actually makes sense. Once his patch is finally merged, I’ll probably pull the tree and see what sort of performance it gets vs. autovectorized SSE2 and AVX-512 via both gcc and clang. P.S. I think this highlights the risks of reporting on patches before they’ve even been merged. Also, the article’s author probably could’ve seen the first reply I quoted from, above, given it was sent less than a hour after the one cited in the article. While it might be somewhat rare for a developer to send such a retraction, the whole purpose of sending patches to such mailing lists is to solicit feedback from other list members (thus leading to fixes & further iteration), which is quite typical. Anything that’s submitted, especially in its first draft, should be considered nothing more than a work-in-progress. So, I’d say the article author (Mark Tyson) deserves an extra demerit for failing to look at all the messages in that mailing list thread. Reply View All 9 Comments Show more comments

Добавить комментарий Отменить ответ

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Свежие записи

  • Explainable RL: Декодируем «Чёрный Ящик» ИИ с Интерпретируемым Обучением с Подкреплением
  • Autonomous Edge Clusters: Развёртывание Kubernetes на беспилотных станциях будущего
  • Neuromorphic Sensors: Полное руководство по Event-Based камерам и обработке событий
  • Server-Side WebAssembly (SSWASM): Революция в Бэкенд-Разработке
  • Data Observability для ETL: Полное руководство по автоматическому мониторингу пайплайнов

Свежие комментарии

Нет комментариев для просмотра.

Архивы

  • Февраль 2026
  • Январь 2026
  • Ноябрь 2025
  • Октябрь 2025
  • Сентябрь 2025
  • Август 2025
  • Июль 2025
  • Июнь 2025
  • Май 2025
  • Апрель 2025

Рубрики

  • AI for Biology
  • Android Development
  • Angular Framework
  • API Development
  • API Разработка
  • Artificial Intelligence / Оптимизация алгоритмов
  • Backend Development
  • Big Data и распределённые системы
  • Blockchain Development
  • Cloud Architecture
  • Cloud Computing
  • Cloud Computing / DevOps
  • Cloud Computing / Distributed Systems
  • Cloud Computing / Serverless Architecture
  • Cloud Infrastructure
  • Cloud Native / DevOps
  • Cloud Native Технологии
  • Cloud Security / Data Protection
  • Cloud Security / DevOps
  • Cloud Security and Compliance
  • Cloud-Native Development
  • Data Engineering
  • Data Engineering / MLOps
  • Data Science
  • Data Science / Биоинформатика
  • Database Management
  • DevOps
  • DevOps и CI/CD
  • DevOps и Cloud Computing
  • DevOps и Cloud Engineering
  • DevOps и Cloud Infrastructure
  • DevOps и Cloud Security
  • DevOps и Cloud-Native Технологии
  • DevOps и Platform Engineering
  • DevOps и Site Reliability Engineering
  • DevOps и автоматизация
  • DevOps и Инфраструктура как Код (IaC)
  • DevOps и Контейнеризация
  • DevOps и Микросервисы
  • DevOps и облачные вычисления
  • DevOps и облачные технологии
  • DevOps и Платформенный инжиниринг
  • DevOps и Системная Инженерия
  • DevOps и Системное администрирование
  • DevOps и Управление Инфраструктурой
  • DevOps и управление разработкой
  • DevOps/Cloud-Native технологии
  • DevOps/Безопасность
  • DevOps/Инструменты разработки
  • DevSecOps
  • DevSecOps/Cloud Security
  • Digital Health Technologies
  • Distributed Systems
  • E-commerce Architecture
  • Edge Computing
  • Frontend Architecture
  • Frontend Development
  • Frontend Разработка
  • Frontend-разработка
  • Game Development
  • Google Cloud / Infrastructure as Code
  • HealthTech
  • iOS Development
  • IT-безопасность
  • IT-разработка
  • Kubernetes и контейнеризация
  • Kubernetes Оптимизация
  • Kubernetes Сетевая Безопасность
  • Kubernetes/GitOps
  • Machine Learning
  • Machine Learning / Distributed Systems
  • Machine Learning Operations (MLOps)
  • Machine Learning Security
  • Machine Learning/Artificial Intelligence
  • MLOps/DevOps
  • Mobile App Marketing
  • Mobile Development
  • Quantum Computing
  • Software Architecture
  • Software Development
  • Software Development Methodologies
  • Web Development
  • Web Development / Computer Graphics
  • Web Development / Virtual & Augmented Reality
  • Web Development / Virtual Reality
  • Web Performance
  • Web3 и блокчейн разработка
  • WebAssembly
  • Архитектура данных
  • Архитектура Микросервисов
  • Архитектура ПО
  • Архитектура ПО и DevOps
  • Архитектура программного обеспечения
  • Архитектура распределенных систем
  • Базы данных
  • Базы данных
  • Базы данных / Big Data / Data Engineering
  • Базы данных и аналитика
  • Базы данных и кэширование
  • Базы данных и потоковая обработка
  • Базы данных и распределённые системы
  • Базы данных и хранилища
  • Базы данных и хранилища данных
  • Без рубрики
  • Блокчейн и Web3 разработка
  • Блокчейн и Web3-разработка
  • Блокчейн и децентрализованные технологии
  • Блокчейн и Криптовалюты
  • Блокчейн и Криптография
  • Блокчейн и Криптотехнологии
  • Блокчейн Разработка
  • Веб-дизайн и UX/UI
  • Веб-производительность
  • Веб-производительность и оптимизация
  • Веб-разработка / Безопасность
  • Веб-разработка / Безопасность и Конфиденциальность
  • Веб-разработка / Компьютерная графика
  • Веб-разработка / Компьютерная графика / Производительность
  • Веб-разработка / Оптимизация производительности
  • Веб-разработка / Системная архитектура
  • Веб-разработка и Data Science
  • Веб-разработка и UX
  • Веб-разработка и безопасность
  • Веб-разработка и Оптимизация
  • Видеотехнологии
  • Высоконагруженные распределённые системы
  • Высокопроизводительные вычисления
  • Децентрализованные технологии
  • Дизайн пользовательских интерфейсов
  • Дизайн пользовательского опыта
  • Инновационные вычислительные технологии
  • Инструменты мониторинга и Observability
  • Инструменты разработчика
  • Интернет вещей (IoT)
  • Интернет Вещей (IoT)
  • Информационная безопасность
  • Инфраструктура и DevOps
  • Искусственный интеллект
  • Искусственный интеллект / Data Science
  • Искусственный интеллект / Аппаратное обеспечение
  • Искусственный интеллект / Безопасность
  • Искусственный интеллект / Машинное обучение
  • Искусственный интеллект / Обработка естественного языка
  • Искусственный интеллект / Регуляторное соответствие
  • Искусственный интеллект / Управление технологиями
  • Искусственный интеллект в дизайне
  • Искусственный интеллект в здравоохранении
  • Искусственный интеллект в промышленности
  • Искусственный интеллект в разработке ПО
  • Искусственный интеллект и безопасность
  • Искусственный интеллект и машинное обучение
  • Искусственный интеллект и Машинное обучение
  • Искусственный интеллект/Компьютерное зрение
  • Искусственный интеллект/Управление IT-проектами
  • Карьера в IT
  • Карьера в IT / Технический менеджмент
  • Карьерный рост в IT
  • Квантовые вычисления и ИИ
  • Квантовые вычисления и сети
  • Кибербезопасность
  • Кибербезопасность / DevSecOps
  • Кибербезопасность и аутентификация
  • Кибербезопасность и блокчейн
  • Кибербезопасность и веб-разработка
  • Кибербезопасность и криптография
  • Кибербезопасность и разработка
  • Кибербезопасность и управление рисками
  • Кибербезопасность/Сетевые технологии
  • Компьютерное зрение
  • Компьютерное зрение / Розничная аналитика
  • Контейнеризация и оркестрация
  • Криптография и Безопасность
  • Криптография и безопасность данных
  • Машинное обучение
  • Машинное обучение / Data Science
  • Машинное обучение / NLP
  • Машинное обучение / NLP / Инструменты разработчика
  • Машинное обучение / Безопасность
  • Машинное обучение / Генеративные модели
  • Машинное обучение / Искусственный интеллект
  • Машинное обучение / Кибербезопасность
  • Машинное обучение / Обработка данных
  • Машинное обучение / Обработка естественного языка
  • Машинное обучение / Оптимизация / MLOps
  • Машинное обучение / Оптимизация моделей
  • Машинное обучение / Устойчивая разработка
  • Машинное обучение в production
  • Машинное обучение в бизнесе
  • Машинное обучение в продакшене
  • Машинное обучение в продакшене (MLOps)
  • Машинное обучение в продакшн / MLOps
  • Машинное обучение и Data Engineering
  • Машинное обучение и ИИ
  • Машинное обучение и Искусственный интеллект
  • Машинное обучение и искусственный интеллект
  • Машинное обучение/MLOps
  • Машинное обучение/Обработка естественного языка
  • Машинное обучение/Оптимизация
  • Машинное обучение/Поисковые технологии
  • Микросервисная архитектура
  • Микросервисы и облачные технологии
  • Микросервисы и распределенные системы
  • Мобильная разработка iOS
  • Мобильная разработка и маркетинг
  • Новости
  • Облачные вычисления и распределенные системы
  • Облачные технологии / DevOps / Устойчивое развитие
  • Обработка Данных / Аналитика
  • Программирование / Оптимизация производительности
  • Программирование / Системное ПО
  • Программирование / Системное ПО / Безопасность
  • Программирование / Функциональные языки / Backend-разработка
  • Программирование и Backend-разработка
  • Программирование и ИИ
  • Программирование и инструменты разработки
  • Программирование и Машинное обучение
  • Программирование/Искусственный интеллект
  • Программная инженерия
  • Программная инженерия / DevOps / Машинное обучение
  • Программная инженерия и архитектура
  • Программная разработка
  • Продуктовая разработка / SaaS / Growth-маркетинг
  • Промышленный IoT и Индустрия 4.0
  • Профессиональное развитие в IT
  • Психология труда в IT
  • Разработка / DevOps / Микросервисы
  • Разработка игр
  • Разработка игр / Блокчейн технологии
  • Разработка игр / Графика / Unreal Engine
  • Разработка игр и VR/AR
  • Разработка игр и иммерсивных технологий
  • Разработка ИИ-приложений
  • Разработка мобильных приложений
  • Разработка ПО
  • Разработка ПО / Оптимизация производительности
  • Разработка ПО / Устойчивое развитие
  • Разработка под AR/VR
  • Разработка под macOS
  • Разработка пользовательских интерфейсов
  • Разработка программного обеспечения
  • Разработка программного обеспечения / Микросервисная архитектура
  • Разработка программного обеспечения / Распределённые системы
  • Разработка распределенных систем
  • Распределённые системы
  • Распределенные системы
  • Распределенные системы / Базы данных
  • Распределенные системы и архитектура
  • Распределённые системы и архитектура
  • Распределенные системы и микросервисы
  • Распределённые системы и сети
  • Робототехника и автономные системы
  • Сетевая инфраструктура и телекоммуникации
  • Сетевое взаимодействие и безопасность
  • Системная архитектура
  • Системная интеграция
  • Системное программирование
  • Системное программирование / Оптимизация производительности
  • Системное программирование Linux
  • Системное проектирование
  • Статьи
  • Тест-автоматизация и QA
  • Техническая документация и Developer Relations
  • Технологии хранения данных
  • Управление IT-командами
  • Управление IT-проектами
  • Управление Данными
  • Управление данными
  • Управление ИТ-инфраструктурой
  • Управление проектами
  • Управление разработкой
  • Функциональное программирование
  • Центры обработки данных и инфраструктура
  • Языки программирования
©2026 ByteVibe — Вайб IT-мира! | Дизайн: Газетная тема WordPress