-
Notifications
You must be signed in to change notification settings - Fork 2
proj_dis_perf_improvements_1
Tsukasa OI edited this page Nov 6, 2022
·
33 revisions
- Working Branches:
- Working Branch:
riscv-dis-opt1-1-hashtable-and-caching - Working Branch:
riscv-dis-opt1-2-mapping
This benchmark is performed on:
- Ubuntu 22.04 LTS
- AMD Ryzen 5 PRO 5650G processor.
In the parallel run, I ran 6 parallel jobs with -j6 (corresponding 6 cores; although the processor has 12 hardware threads, -j12 just slowed the benchmark).
| Type | Expected Improvements (in general) |
|---|---|
| Binary Files | 50-130% |
| RISC-V ELF Programs | 30-40% |
| RISC-V ELF Libraries | 30-500% |
This is relative to the latest master (commit beaad4923538) and taken on 2022-11-02.
- Prerequisites (applying both):
- HTable/Caching
- All previous changes
riscv-dis-opt1-1-hashtable-and-caching
- Mapping Syms
- All previous changes
riscv-dis-opt1-2-mapping
| Program | Prerequisites | HTable/Caching | Mapping Syms | Notes |
|---|---|---|---|---|
Busybox 1.35.1 (RV64GC) |
2.9-3.9% | 34.8-38.3% | 38.6-39.8% | |
OpenSBI 1.1 (generic fw_*.elf) |
5.5-7.8% | 64.3-65.8% | 70.6-71.6% | |
Linux kernel 5.19 (vmlinux) |
15.0-20.3% | 47.6-52.2% | 65.3-81.5% | |
Linux kernel 5.19 (vmlinux.o) |
58.6-68.9% | 69.5-75.3% | 234.0-471.7% | Not finally linked |
glibc (libc.so.6) |
4.9-6.6% | 33.3-37.7% | 38.6-43.0% |
| Program | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|
glibc (libc.a) |
96.8-102.7% | 104.0-108.9% | 1067.8-1127.6% |
newlib (libc.a) |
63.8-71.6% | 70.3-80.1% | 265.8-295.3% |
| Program | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|
Linux kernel 5.19 (vmlinux) |
(-2.1)-(-0.9)% | 114.7-138.9% | 115.7-138.8% |
Random files (/dev/urandom) |
(-2.4)-(-2.2)% | 142.5-144.2% | 142.8-143.7% |
| 1M (1048576) CSR instructions | 2.2% | 672.3% | 681.2% |
| Program | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|
Linux kernel 5.19 (vmlinux) with debug info |
34.8% | 38.8% | 39.3% |
Linux kernel 5.19 (vmlinux) without debug info |
92.7% | 106.5% | 106.4% |
OpenSBI 1.1 (generic fw_*.elf) |
65.6-66.6% | 80.2-80.7% | 80.2-80.3% |
| 1M (1048576) CSR instructions (ELF) | 64.2% | 300.7% | 304.3% |
| System | Path | N | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) |
/usr/bin |
563 | 2.3% | 29.6% | 31.3% |
| Debian unstable (as of 2022-07-20) |
/usr/bin |
269 | 1.8% | 29.4% | 31.0% |
| Ubuntu 22.04 LTS (image for HiFive Unmatched) |
/usr/lib |
6797 | 49.8% | 67.7% | 183.9% |
| Debian unstable (as of 2022-07-20) |
/usr/lib |
548 | 82.5% | 101.4% | 433.3% |
| System | N | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) |
7666 | 38.6% | 54.6% | 128.5% |
| Debian unstable (as of 2022-07-20) |
946 | 119.8% | 123.5% | 389.7% |
| System | Path | N | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) |
/usr/bin |
563 | 1.4% | 79.0% | 80.4% |
| Debian unstable (as of 2022-07-20) |
/usr/bin |
269 | 1.1% | 66.8% | 68.0% |
| System | N | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|---|
| Ubuntu 22.04 LTS (image for HiFive Unmatched) |
7666 | (-0.4)% | 82.2% | 83.2% |
| Debian unstable (as of 2022-07-20) |
946 | 0.7% | 66.9% | 67.5% |
| Program | N | Prerequisites | HTable/Caching | Mapping Syms | (in other words) |
|---|---|---|---|---|---|
| OpenSSL | 2 | 119.7-124.5% | 124.6-129.6% | 2664.3%-2677.8% | x27.643-27.778 |
| LLVM | 1 | 129.2% | 128.7% | 22164.8% | x222.648 |
- OpenSSL
- Ubuntu 22.04 LTS (image for HiFive Unmatched) :
/usr/lib/riscv64-linux-gnu/libcrypto.so.3 - Debian unstable (as of 2022-07-20) :
/usr/lib/riscv64-linux-gnu/libcrypto.so.3
- Ubuntu 22.04 LTS (image for HiFive Unmatched) :
- LLVM
- Ubuntu 22.04 LTS (Package
libllvm14Version1:14.0.0-1ubuntu1) :/usr/lib/riscv64-linux-gnu/libLLVM-14.so.1
- Ubuntu 22.04 LTS (Package
For large library with many symbols, the effect of the mapping symbol optimization is huge. I did expect some improvements but not that huge.
This optimization also benefits Arm architecture (not AArch64, due to different mapping symbol handlings).
| Program | w/ISA | Prerequisites | HTable/Caching | Mapping Syms |
|---|---|---|---|---|
Busybox 1.35.1 (RV64GC) with debug info |
N | 4.3% | 34.9% | 38.8% |
Busybox 1.35.1 (RV64GC) with debug info |
Y | 176.3% | 256.7% | 264.8% |
Linux kernel 5.19 (vmlinux) without debug info |
N | 15.0% | 47.6% | 64.5% |
Linux kernel 5.19 (vmlinux) without debug info |
Y | 269.0% | 350.6% | 501.9% |
Linux kernel 5.19 (vmlinux.o) without debug info |
N | 58.4% | 75.2% | 235.8% |
Linux kernel 5.19 (vmlinux.o) without debug info |
Y | 192.4% | 224.4% | 454.8% |
Mapping symbols with ISA benefits from new optimizations.