-
Notifications
You must be signed in to change notification settings - Fork 1
riscv_dis_opts_cache_support
Tsukasa OI edited this page Aug 31, 2022
·
19 revisions
- Status: WITHDRAWN
Combined with another fixes and superseded byriscv-dis-opts-batch-1
- Branch:
riscv-dis-opts-cache-support
- Tracking PR: #22 (view Pull Request and Diff)
Aggregate performance benchmark should be available here.
- Disassembler: Use faster hash table
- Disassembler: Minor optimizations (batch 1)
- (You are here) Disassembler: Cache instruction class support
As I mentioned in the previous patchset, calling riscv_subset_supports
repeatedly harms the performance in a measurable way (about 3-13% in total).
As a simple solution, this patch now caches instruction class support as a signed char
array.
On disassembling linked RISC-V ELF programs using objdump
, performance improvements achieved by this patchset is about 5-7%. Not bad for a simple change.
This is relative to the previous optimization.
Program | Improvements | Notes |
---|---|---|
Busybox 1.35.1 (RV64GC ) |
6.3-7.1% | |
OpenSBI 1.1 (generic fw_*.elf ) |
7.4-8.0% | |
Linux kernel 5.18 (vmlinux ) |
6.1-6.4% | |
Linux kernel 5.18 (vmlinux.o ) |
0.3-2.5% | Not finally linked |
glibc (libc.so.6 ) |
6.4-7.0% |
Program | Improvements |
---|---|
glibc (libc.a ) |
0.6-1.0% |
newlib (libc.a ) |
1.2-1.9% |
Program | Improvements |
---|---|
Linux kernel 5.18 (vmlinux ) |
8.6-8.8% |
Random files (/dev/urandom ) |
8.5-9.0% |
1M (1048576) CSR instructions | 37.4% |
Program | Improvements |
---|---|
Linux kernel 5.18 (vmlinux ) with debug info |
1.0% |
Linux kernel 5.18 (vmlinux ) without debug info |
1.7% |
OpenSBI 1.1 (generic fw_*.elf ) |
1.5-1.6% |
1M (1048576) CSR instructions (ELF) | 8.1% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 563 | 6.3% |
Debian unstable (as of 2022-07-20) | 269 | 5.9% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 100 | 3.0% |
Debian unstable (as of 2022-07-20) | 100 | 1.0% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 7666 | 2.9% |
Debian unstable (as of 2022-07-20) | 946 | 0.9% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 563 | 8.0% |
Debian unstable (as of 2022-07-20) | 269 | 8.6% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 100 | 8.9% |
Debian unstable (as of 2022-07-20) | 100 | 8.3% |
System | N | Improvements |
---|---|---|
Ubuntu 22.04 LTS (image for HiFive Unmatched) | 7666 | 8.2% |
Debian unstable (as of 2022-07-20) | 946 | 7.2% |