dlang / project-ideas

Collection of impactful projects in the D ecosystem
36 stars 12 forks source link

AArch32 / AArch64 support for intel-intrinsics #71

Closed p0nce closed 3 years ago

p0nce commented 4 years ago

Description

Like SIMDe, intel-intrinsics has the goal to program SIMD portably across ARM and x86, even if the base instrinsics are x86.

What are rough milestones of this project?

AArch32 is much less important, being more about Rapsberry Pi portability.

How does this project help the D community?

Optimizing with intel-intrinsics is very quick and yield fast results much more quickly than with assembly, and with more possibilities than just core.simd. A prime example of this is dg2d, fastest software renderer in D: https://github.com/cerjones/dg2d

Recently there has been a surge of interest for libraries that abstract ARM and x86 intrinsics under either semantics:

If D doesn't have this wrapper, making fast program will be more practical in C++ in a world split between x86 and ARM.

Recommended skills

Interest in learning about compiler optimizations, in LLVM, and in fast programs. Grit. Correctness and detail-oriented. This is thankless work with many subleties such as float rounding, float comparisons...

What can students expect to get out of doing this project?

You will discover how much compiler backends like LLVM optimize, and it will change your way to write optimized code.

Point of Contact

Guillaume Piolat, contact@auburnsounds.com

References

ibuclaw commented 4 years ago

From what I recall from a GNU Cauldron talk, the PowerPC folks do the same thing too and have a header with the same functions as mmintrin.h, but with power intrinsics used there instead.

p0nce commented 3 years ago

I've done it myself :) would be interesting to do it for ssse3 sse4.1 sse4.2 avx avx2 but it's a lot of work too