Skip to content

proj_dis_perf_improvements_1

Tsukasa OI edited this page Sep 3, 2022 · 33 revisions

Project: Disassembler Performance Improvements (Optimization 1)

  • Working Branches:
    • riscv-dis-opt1-req-tidying
    • riscv-dis-opt1-req-reorganize
  • Working Branch: riscv-dis-opt1-1-hashtable-and-caching
  • Working Branch: riscv-dis-opt1-2-mapping

Benchmarking System

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).

Aggregate Performance Improvements

Type General Improvements
Binary Files 40-100%
RISC-V ELF Programs 20-40%
RISC-V ELF Libraries 70-200%

This is relative to the latest master (commit 27d582267a1d) and taken on 2022-08-29.

Columns

  • Prerequisites
    riscv-dis-opt1-req-tidying and riscv-dis-opt1-req-reorganize
  • HTable/Caching
    All previous changes + riscv-dis-opt1-1-hashtable-and-caching
  • Mapping Syms
    All previous changes + riscv-dis-opt1-2-mapping

objdump -d (ELF)

Program Prerequisites HTable/Caching Mapping Syms Notes
Busybox 1.35.1 (RV64GC) 0.8-2.0% 27.5-30.4% 30.7-32.1%
OpenSBI 1.1 (generic fw_*.elf) (-3.4)-(-1.5)% 33.8-35.0% 33.0-37.1%
Linux kernel 5.18 (vmlinux) 1.6-1.9% 26.6-28.6% 42.0-48.8%
Linux kernel 5.18 (vmlinux.o) 3.0-3.7% 4.3-14.0% 111.7-268.7% Not finally linked
glibc (libc.so.6) 0.8-2.0% 25.1-31.7% 29.4-34.7%

objdump -d (ELF-based archive)

Program Prerequisites HTable/Caching Mapping Syms
glibc (libc.a) 6.1-7.5% 7.4-9.0% 502.4-527.1%
newlib (libc.a) 3.3-6.4% 4.0-9.7% 126.2-140.0%

objdump -D (binary)

Program Prerequisites HTable/Caching Mapping Syms
Linux kernel 5.18 (vmlinux) (-5.8)-(-5.1)% 76.9-110.3% 77.9-111.3%
Random files (/dev/urandom) (-8.8)-(-3.3)% 110.8-117.8% 112.1-119.2%
1M (1048576) CSR instructions (-3.8)% 375.0% 380.3%

gdb: disas of near all code region

Program Prerequisites HTable/Caching Mapping Syms
Linux kernel 5.18 (vmlinux) with debug info 25.0% 29.1% 28.3%
Linux kernel 5.18 (vmlinux) without debug info 69.3% 82.3% 79.3%
OpenSBI 1.1 (generic fw_*.elf) 46.0-48.3% 57.4-58.8% 57.0-58.3%
1M (1048576) CSR instructions (ELF) 43.1% 189.0% 186.3%

Batch: objdump -d on Linux distribution

Serial Run: All ELF Files Under the Directory

System Path N Prerequisites HTable/Caching Mapping Syms
Ubuntu 22.04 LTS (image for HiFive Unmatched) /usr/bin 563 0.1% 25.8% 25.0%
Debian unstable (as of 2022-07-20) /usr/bin 269 1.8% 23.2% 22.3%
Ubuntu 22.04 LTS (image for HiFive Unmatched) /usr/lib 6797 3.0% 13.2% 79.6%
Debian unstable (as of 2022-07-20) /usr/lib 548 1.2% 10.8% 174.0%

Parallel Run: All (including data-only ELFs)

System N Prerequisites HTable/Caching Mapping Syms
Ubuntu 22.04 LTS (image for HiFive Unmatched) 7666 1.6% 11.7% 63.8%
Debian unstable (as of 2022-07-20) 946 2.2% 4.8% 116.9%

Batch: objdump -D (as binary) on Linux distribution

Serial Run: All ELF Files Under the Directory

System Path N Prerequisites HTable/Caching Mapping Syms
Ubuntu 22.04 LTS (image for HiFive Unmatched) /usr/bin 563 (-2.2)% 55.2% 55.4%
Debian unstable (as of 2022-07-20) /usr/bin 269 (-2.3)% 42.7% 44.7%

Parallel Run: All (including data-only ELFs)

System N Prerequisites HTable/Caching Mapping Syms
Ubuntu 22.04 LTS (image for HiFive Unmatched) 7666 (-3.8)% 58.7% 60.8%
Debian unstable (as of 2022-07-20) 946 (-1.9)% 48.0% 47.7%
Clone this wiki locally