Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
96862df
Add profiling analysis results and optimization plan
tautschnig Mar 11, 2026
115f597
Add string hashing investigation results
tautschnig Mar 11, 2026
c4d111a
Merge hashing investigation into profiling analysis
tautschnig Mar 11, 2026
e2385d1
Replace ostringstream with string concatenation in SSA identifier bui…
tautschnig Mar 11, 2026
60dd75c
Update profiling analysis with SSA identifier optimization results
tautschnig Mar 11, 2026
cc9afd7
Optimize set_level_2 to avoid full SSA identifier rebuild
tautschnig Mar 11, 2026
7d0f141
Optimize set_level_0 and set_level_1 to append suffixes directly
tautschnig Mar 11, 2026
462db0d
Update profiling analysis with post-optimization investigation
tautschnig Mar 11, 2026
d930787
Add alternative allocator investigation: 18-25% speedup with tcmalloc…
tautschnig Mar 11, 2026
dd7d684
Add CMake option to auto-detect and link tcmalloc or jemalloc
tautschnig Mar 11, 2026
03c3b6f
Remove unused `non_sharing_tree`
thomasspriggs Oct 12, 2023
a26290b
Make `irept` hold a union of a pointer or an id
thomasspriggs Oct 12, 2023
8d35e00
Update profiling analysis with final combined results
tautschnig Mar 11, 2026
bbdad94
Install tcmalloc in Linux CI workflows
tautschnig Mar 11, 2026
c963ceb
Add remaining optimization plans (A-D)
tautschnig Mar 11, 2026
21370c2
Complete profiling analysis documentation
tautschnig Mar 11, 2026
3eb502e
Cache suffix counter in get_new_name to avoid O(n) symbol table probing
tautschnig Mar 11, 2026
cb87ce5
Add free-list pool allocator for tree_nodet
tautschnig Mar 11, 2026
414d346
Optimize field_sensitivityt::get_fields loop invariants
tautschnig Mar 11, 2026
7bd4021
Update profiling analysis with post-verification hotspot analysis
tautschnig Mar 11, 2026
761a6f3
Document field_sensitivityt::apply optimization investigation
tautschnig Mar 11, 2026
8306a38
Document get_fields loop invariant hoisting results
tautschnig Mar 11, 2026
9e1f4bf
Profile after get_fields optimization: field_sensitivity down to 1.6%
tautschnig Mar 11, 2026
f6e72f5
Compare irep hash functions: BASIC, MURMURHASH2A, MURMURHASH3
tautschnig Mar 11, 2026
94bb985
Investigate reducing operator== calls in merge_irept
tautschnig Mar 11, 2026
79543f7
Profiling: pre-compile C sources to goto binaries via goto-cc
tautschnig Mar 12, 2026
c88465e
Analysis: merge frequency reduction and goto-cc workflow
tautschnig Mar 12, 2026
4966b76
Update profiling analysis with re-verification results
tautschnig Mar 12, 2026
951b2b8
Definitive allocator analysis: tcmalloc 21%, pool 3.2%, combined 22%
tautschnig Mar 12, 2026
bd7b781
Fix contradictions in PROFILING_ANALYSIS.md
tautschnig Mar 12, 2026
51b000f
Use unordered_set in simplify_inequality_pointer_object
tautschnig Mar 12, 2026
4812b3a
Construct object_descriptor_exprt directly in value_sett::to_expr
tautschnig Mar 12, 2026
d97268f
Update PROFILING_ANALYSIS.md with comprehensive results and latest pr…
tautschnig Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-test-Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
sudo apt-get install --no-install-recommends -y clang-19 clang++-19 flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
sudo apt-get install --no-install-recommends -y libssl-dev libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
sudo apt-get install --no-install-recommends -y gawk jq
sudo apt-get install --no-install-recommends -y libgoogle-perftools-dev

- name: Prepare ccache
uses: actions/cache@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y g++ gcc gdb binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov ccache z3
sudo apt-get install --no-install-recommends -y g++ gcc gdb binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov ccache z3 libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison ccache
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison ccache libgoogle-perftools-dev

- name: Prepare ccache
uses: actions/cache/restore@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/profiling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
fi
echo "$(dirname "$PERF_REAL")" >> "$GITHUB_PATH"
"$PERF_REAL" --version
# perf requires perf_event_paranoid=-1 for call graph recording
sudo sysctl kernel.perf_event_paranoid=-1

- name: Restore ccache
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pull-request-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq gcc gdb g++ maven jq flex bison libxml2-utils ccache cmake z3
sudo apt-get install --no-install-recommends -yq gcc gdb g++ maven jq flex bison libxml2-utils ccache cmake z3 libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3 libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down Expand Up @@ -361,7 +361,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3 libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down Expand Up @@ -468,7 +468,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen graphviz z3 libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils ccache doxygen z3 g++-multilib
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils ccache doxygen z3 g++-multilib libgoogle-perftools-dev
- name: Confirm z3 solver is available and log the version installed
run: z3 --version
- name: Download cvc-5 from the releases page and make sure it can be deployed
Expand Down
47 changes: 47 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,53 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
endif()
endif()

# Alternative memory allocator for improved performance.
# tcmalloc and jemalloc give 18-25% speedup on typical CBMC workloads
# due to better handling of many small allocations (irept tree nodes).
# Set to "auto" to detect, or "tcmalloc", "jemalloc", or "system".
set(allocator "auto" CACHE STRING "Memory allocator: auto, tcmalloc, jemalloc, or system")

if(NOT allocator STREQUAL "system")
if(allocator STREQUAL "auto" OR allocator STREQUAL "tcmalloc")
find_library(TCMALLOC_LIB NAMES tcmalloc_minimal tcmalloc)
endif()
if(allocator STREQUAL "auto" OR allocator STREQUAL "jemalloc")
find_library(JEMALLOC_LIB NAMES jemalloc)
endif()

if(allocator STREQUAL "tcmalloc")
if(NOT TCMALLOC_LIB)
message(FATAL_ERROR "tcmalloc requested but not found")
endif()
set(CBMC_ALLOCATOR_LIB ${TCMALLOC_LIB})
message(STATUS "Using tcmalloc: ${TCMALLOC_LIB}")
elseif(allocator STREQUAL "jemalloc")
if(NOT JEMALLOC_LIB)
message(FATAL_ERROR "jemalloc requested but not found")
endif()
set(CBMC_ALLOCATOR_LIB ${JEMALLOC_LIB})
message(STATUS "Using jemalloc: ${JEMALLOC_LIB}")
elseif(allocator STREQUAL "auto")
if(TCMALLOC_LIB)
set(CBMC_ALLOCATOR_LIB ${TCMALLOC_LIB})
message(STATUS "Auto-detected tcmalloc: ${TCMALLOC_LIB}")
elseif(JEMALLOC_LIB)
set(CBMC_ALLOCATOR_LIB ${JEMALLOC_LIB})
message(STATUS "Auto-detected jemalloc: ${JEMALLOC_LIB}")
else()
message(STATUS "No alternative allocator found, using system malloc")
endif()
endif()
endif()

# Make the allocator available for executables via cprover_allocator target.
if(CBMC_ALLOCATOR_LIB)
add_library(cprover_allocator INTERFACE)
target_link_libraries(cprover_allocator INTERFACE ${CBMC_ALLOCATOR_LIB})
else()
add_library(cprover_allocator INTERFACE)
endif()

function(cprover_default_properties)
set(CBMC_CXX_STANDARD ${CMAKE_CXX_STANDARD})
set(CBMC_CXX_STANDARD_REQUIRED ${CMAKE_CXX_STANDARD_REQUIRED})
Expand Down
Loading
Loading