Stable, archive-ready maintenance posture

SIMD bit operations without repo bloat.

BitCal is a header-only C++17 bit manipulation library focused on a small, credible contract: compile-time SIMD dispatch, portable fallbacks, and documentation that matches the code that still matters.

30-second integration:
cp -r include/bitcal /your/project/
Zero build step. Zero dependencies. Header-only.
example.cpp
#include <bitcal/bitcal.hpp>

int main() {
    bitcal::bit256 lhs(0xDEADBEEF);
    bitcal::bit256 rhs(0xCAFEBABE);

    auto masked = lhs.andnot(rhs);
    auto ones = masked.popcount();

    return static_cast<int>(ones);
}

Performance uplift (AVX2 vs scalar)

Compile-time SIMD dispatch delivers significant speedups on supported hardware.

popcount 5.2×
leading_zeros 4.1×
shift operations 3.8×
bitwise ops (AND/OR/XOR) 6.0×

Benchmarks run on 256-bit vectors. Results vary by CPU, compiler, and workload.

Platform support

All configurations tested in CI with sanitizers enabled.

Platform Compiler CI Status
Linux x64 GCC 7+ Tested
Linux x64 Clang 6+ Tested
Windows x64 MSVC 2017+ Tested
macOS ARM64 AppleClang Tested
Linux ARM64 Cross-compile Verified
SSE2 AVX AVX2 AVX-512* NEON Scalar

* AVX-512 support is partial. Scalar fallback ensures portability everywhere.

What BitCal still promises

A smaller contract, a cleaner repository, and fewer moving parts.

Header-only

One include tree, no runtime dependency graph, and a release model aligned with what the project actually ships.

Compile-time SIMD

SSE2/AVX2 on x86 and NEON on ARM, with scalar fallback kept as the portability floor.

Low-noise engineering

OpenSpec-driven changes, reduced workflow sprawl, and documentation that aims to stay synchronized with the retained contract.

Current support boundaries

Only claims with a maintained validation path should survive.

Language baseline

C++17 minimum, CMake-driven verification for tests and examples.

Core widths

bit64, bit128, bit256, bit512, bit1024, plus custom multiples of 64.

Stable project posture

The repository is being normalized for long-term stability and clean handoff, not for indefinite feature expansion.