riscv-llvm icon indicating copy to clipboard operation
riscv-llvm copied to clipboard

Further investigate performance differences vs riscv-gcc

Open asb opened this issue 7 years ago • 1 comments

Using benchmarks from https://github.com/rv8-io/rv8-bench/ I see the current dynamic instruction counts (note: this isn't a perfect proxy for performance, but reasonable for initial comparisons):

Benchmark aes with -march=rv32im and -O3 gcc instret: 283330319 clang instret: 271796365 clang/gcc: 95.00% Benchmark dhrystone with -march=rv32im and -O3 gcc instret: 274275911 clang instret: 336272568 clang/gcc: 122.00% Benchmark norx with -march=rv32im and -O3 gcc instret: 129801139 clang instret: 134429519 clang/gcc: 103.00% Benchmark qsort with -march=rv32im and -O3 gcc instret: 814554722 clang instret: 692674566 clang/gcc: 85.00% Benchmark sha512 with -march=rv32im and -O3 gcc instret: 227057803 clang instret: 274505822 clang/gcc: 120.00%

clang/gcc < 100% means there are fewer dynamic instructions for the clang-generated binary, and > 100% means fewer dynamic instructions for the gcc-generated binary.

Taken with the current version of this clang+llvm patchset and a recent gcc 8.0.0 build. We did better than gcc 7.1.1 for dhrystone, but gcc has since improved.

asb avatar Dec 20 '17 18:12 asb

Looks promising. I suppose the acid test would be comparing against thumb2 code.

Sent from my iPhone

On 20 Dec 2017, at 18:37, Alex Bradbury [email protected] wrote:

Using benchmarks from https://github.com/rv8-io/rv8-bench/ I see the current dynamic instruction counts (note: this isn't a perfect proxy for performance, but reasonable for initial comparisons):

Benchmark aes with -march=rv32im and -O3 gcc instret: 283330319 clang instret: 271796365 clang/gcc: 95.00% Benchmark dhrystone with -march=rv32im and -O3 gcc instret: 274275911 clang instret: 336272568 clang/gcc: 122.00% Benchmark norx with -march=rv32im and -O3 gcc instret: 129801139 clang instret: 134429519 clang/gcc: 103.00% Benchmark qsort with -march=rv32im and -O3 gcc instret: 814554722 clang instret: 692674566 clang/gcc: 85.00% Benchmark sha512 with -march=rv32im and -O3 gcc instret: 227057803 clang instret: 274505822 clang/gcc: 120.00%

clang/gcc < 100% means there are fewer dynamic instructions for the clang-generated binary, and > 100% means fewer dynamic instructions for the gcc-generated binary.

Taken with the current version of this clang+llvm patchset and a recent gcc 8.0.0 build. We did better than gcc 7.1.1 for dhrystone, but gcc has since improved.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jrrk avatar Dec 20 '17 19:12 jrrk