Hi everyone,

my name is Amin and I'm a PhD student in the domain of cryptographic engineering at MPI-SP in Bochum, Germany. In that context, I am a maintainer of SLOTHY (https://github.com/slothy-optimizer/slothy), an assembly-level superoptimizer that leverages constraint solving to do register allocation, instruction scheduling, and software pipelining/periodic loop interleaving on straight-line code.

We have used this tool in the context of cryptographic implementations successfully, yielding performance gains of up to 40% for hot loops compared to state-of-the-art handwritten assembly on Arm Cortex-A72 and Cortex-A55. Next to performance gains, our approach can also aid with long-term maintainability of the code: You can keep a clean, readable implementation as "input" and turn it into a fast, optimized implementation by running SLOTHY on it automatically. For details on this, you can refer to our publications at https://eprint.iacr.org/2022/1303 or https://eprint.iacr.org/2025/366.

SLOTHY has been deployed in real-world use-cases before, for example, to optimize code in Amazon AWS libcrypto, Arm EndpointAI, as well as mlkem-native/mldsa-native.

I would be interested in applying our tool to other software beyond cryptography that relies on highly performant assembly code. ffmpeg came to mind as a natural target for this, esp. given the fact that it supports AArch64 (+Neon), which is what we have most experience with (next to Armv7/8M and RV64*).

Before starting this project, I would be curious about the following things that have not become fully clear to me by reading doc/optimization.txt: - What is the optimization-target for the handwritten assembly on AArch64? Do you target any specific microarchitecture? Are there specific constraints on the assembly code? - Do you have any recommendations on relevant routines to consider as initial targets? I went through the source tree and found many assembly files but I'm lacking the knowledge to judge which one would be an "impactful" starting point. - Is there any dedicated infrastructure for such "fine-grained" performance evaluation/profiling? Like, anything else than re-compiling ffmpeg and running one of the real-world tasks that leverages the optimization target. - Is there any interest from the development community's side in optimized assembly routines? I would like to try regardless but if the optimizations can be helpful in a broader sense, that would be nice.

Any input or pointers on this matter would be appreciated!

Kind regards
Amin

--
Amin Abdulrahman (he/him)
PhD Student

Max Planck Institute for Security and Privacy (MPI-SP)
Universitätsstraße 140
44799 Bochum, Germany

https://www.mpi-sp.org

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to