2 ms·
A while back there was a blog post (I think by Dark Shikari) about the use of assembly in x264. I couldn't find it by searching, but basically the very best C
by nitrogen 11y ago
A while back there was a blog post (I think by Dark Shikari) about the use of assembly in x264. I couldn't find it by searching, but basically the very best C versions of essential image processing algorithms were orders of magnitude slower than the hand-crafted assembly versions, especially with SIMD instructions.
To create a viable codec, a functional spec compiler would have to close that performance gap. Edit: it might be possible to create a set of SIMD algorithmic building blocks (e.g. like liboil[0]) that could be verified for correctness then incorporated into the compiler.
[0] https://wiki.freedesktop.org/liboil/ https://wiki.freedesktop.org/liboil/
- teacup50 11y agoThere has been work on typed assembly that could also apply: http://research.microsoft.com/en-us/projects/talproj/ http://research.microsoft.com/en-us/projects/talproj/
- peteretep 11y agoConveniently computers are getting orders of magnitude faster and cheaper, while the software on them - by virtue of complexity - has an increasing attack surface. I will happily trade a video player utilising 4% of my CPU power and with fewer potential vulnerabilities than one using 0.4%.
- nitrogen 11y agoWhen it comes to video encoding, the tradeoff is often between encoding live video or not encoding live video. I think there's also an important tradeoff to be made in how much of a carbon footprint we dedicate to software. I really don't think we should be trying to make software expand to consume all available resources. We have to be both efficient and secure.
- Too 11y agoEven when you are on a mobile device constrained by battery?