Today's hand written assembly patch from the legendary "mkver" upgrading old MMX code into new(ish) SSSE3:

Over 14 times faster than C.

Apr 10, 2026 · 11:37 AM UTC

42
98
2,473
102,600
Replying to @FFmpeg
The MMX code was removed after this patch
1
0
77
8,542
RepliesRelevant
Replying to @FFmpeg
@FFmpeg ffmpeg is one of the few places left on this site where people still argue about actual machine instructions instead of benchmark screenshots. love to see it. also the maintainability point matters more than people think once old SIMD paths become landmines
1
0
99
3,628
Replying to @im_yeyito
@im_yeyito "mkver" is removing our old SIMD paths and upgrading them to newer ones
0
0
42
2,753
Replying to @FFmpeg
@FFmpeg why SSE3 and not AVX2?
1
0
11
3,301
Replying to @digital_n01se
@digital_n01se Not an important enough codec to do it
0
0
31
2,359
Replying to @FFmpeg
@FFmpeg That hand tuned patch from MMX to SSSE3 by FFmpeg demonstrates how targeted assembly keeps performance ahead in real world video workloads
0
0
20
1,670
Replying to @FFmpeg
@FFmpeg BuT wHy CaNt yoU WriTe iT iN RuST?
1
1
97
2,906
Replying to @FFmpeg
@FFmpeg Me anytime I read "Hand written assembly". You people are wizards
0
1
26
1,218
Replying to @FFmpeg
@FFmpeg 14 times the speed of light? 😲
It must've come from the future.
0
0
7
1,074
Replying to @FFmpeg
@FFmpeg At this rate FFMPEG will be rewritten in assembly
1
0
5
2,567
Replying to @FFmpeg
@FFmpeg Isn't SSSE3 20 years old?
2
0
4
3,594
Replying to @FFmpeg
@FFmpeg nice, this is what I want to see...

btw... did you guys stopped accepting patch from mythos?
0
0
4
2,366
Replying to @FFmpeg
@FFmpeg still wild that handwritten asm can blow c out of the water like that.
0
0
3
217
Replying to @FFmpeg
@FFmpeg MMX chips were peak society. Windows 95 version B, mIRC, and ftp client and you were in business
0
0
3
955
Replying to @FFmpeg
@FFmpeg Really wonder if giving AI the cpu physical layout it might come up with some insane assembly taking advantage of physics and some timing wizardry that’d be incomprehensible yet usable
2
0
2
1,547
Replying to @FFmpeg
@FFmpeg had any luck with the recently hyped-up tools on generating good assembly?
0
0
2
1,889
Replying to @FFmpeg
@FFmpeg MMX...
0
0
1
180
Replying to @FFmpeg
@FFmpeg The Rustaceans will be seething about this because it's not memory safe.
2
0
1
511
Replying to @FFmpeg
@FFmpeg Hand-written SIMD still has its place. We hit similar trade-offs in GCP video encoding pipelines — sometimes the compiler just can't see the optimization path. The maintainability vs performance balance is real, but for hot paths the payoff is worth it.
0
0
1
450
Replying to @FFmpeg
@FFmpeg The legends at work
0
0
1
754
Replying to @FFmpeg
@FFmpeg Thanks
0
0
1
609
Replying to @FFmpeg
@FFmpeg legend
0
0
1
855
Replying to @FFmpeg
@FFmpeg What's the threshold for keeping multiple implementations around? Surely a function that is only 2 % faster than the C version would be considered for pruning.
0
0
1
438
Replying to @FFmpeg
@FFmpeg Getting ready to apt update!
0
0
1
936
Replying to @FFmpeg
@FFmpeg legendary status for assembly coders.
0
0
1
1,157
Replying to @FFmpeg
@FFmpeg wow thats so cool, the C compiler produced slower code even with flags to use those wide instructions?
0
0
0
13
Replying to @FFmpeg
@FFmpeg how fast is it if compare with mmx assembly?

why compare it with c if it was already written in assembly?
0
0
0
56
Replying to @FFmpeg
@FFmpeg Mmmmm supplementary streaming single instruction multiple data extensions....
0
0
0
126
Replying to @FFmpeg
@FFmpeg You should have used certain other language, It would bem safer and 100x master🤥
0
0
0
27
Replying to @FFmpeg
@FFmpegitten assembly can give massive gains. Many years ago, I worked at Matrox and did the conversion from 32-bit to 64-bit of their mpeg-2 video codec. 100% pure assembly, unrolled loop, no function, it was 10k+ thousands line of code, the 64-bit gave us 15-20% performance boost, just for the extra 8 cpu register we could use instead of the stack! This codec was blasting fast, it was 4 to 8X faster then competition, we could encode 4 1080p video in real time on a dual opteron system. (at that time, Adobe Premiere could not even encode a single 480p video in real time ....)
0
0
0
88
Replying to @FFmpeg
@FFmpeg 😳
0
0
0
186
Replying to @FFmpeg
@FFmpeg @grok que es esto explicado en wspañol
1
0
0
31
Replying to @FFmpeg
@FFmpeg Where's the rust dev? Don't you have passions to rewrite this in rust?
0
0
0
110
Replying to @FFmpeg
@FFmpeg Is anyone at Ffmpeg doing Autoresearch style experiments to wring out extra speed from the codebase?
0
0
0
880
Replying to @FFmpeg
@FFmpeg This is going to be fun.
0
0
0
252
Replying to @FFmpeg
@FFmpeg Cool
0
0
0
99