vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.32k stars 149 forks source link

Faust compiling for MIR #54

Open sletz opened 4 years ago

sletz commented 4 years ago
C++_LLVM_MIR-28:02:20

The Faust compiler now generates MIR code. Here is a benchmark on a set of DSPs (on macOS 10.13, 2.2 Ghz Core I7):

The backend code is here.

Now waiting to have more CPUs supported by MIR !

vnmakarov commented 4 years ago

Stephane, thank you very much for trying MIR and provided performance data!

I do have plans to port MIR to more targets. I am planning to port MIR ppc64 and z-series before the summer. I am thinking about making the first MIR release this summer too.

As for the performance, loop invariant code motion and register renaming (for better register allocation and better invariant code motion) will be added and ready in about 1-2 months. I hope this will improve the performance a bit.

dibyendumajumdar commented 4 years ago

Can you explain what the figures mean? Is higher bar better or worse?

sletz commented 4 years ago

C++ is the reference (= 1), higher is better. So basically on the tests MIR run between 31% (violonMIDI.dsp) up to 83% (mixer.dsp) of the C++ version. C++ and LLVM IR code is emitted on native mode (equivalent to -march=native) and -Ofast. C++ and LLVM may also auto-vectorize.