Skip to content

Further investigate performance differences vs riscv-gcc #53

@asb

Description

@asb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions