diff --git a/.github/scripts/compare_benchmarks.sh b/.github/scripts/compare_benchmarks.sh new file mode 100755 index 00000000..46fe546b --- /dev/null +++ b/.github/scripts/compare_benchmarks.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# Copyright 2026 Matt Borland +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt +# +# Reports the data sets in $1 against the numbers committed under +# doc/modules/ROOT/data and appends the report to the job summary. Run it from +# the root of the library checkout. +# +# This is informational only: shared runners drift by a few percent from run to +# run, so a slower number is a prompt to look, not a build failure. + +set -e + +RESULTS=${1:-bench-results} + +PYTHON=python3 +if ! command -v python3 > /dev/null 2>&1; then + PYTHON=python +fi + +"$PYTHON" doc/render_benchmarks.py --compare "$RESULTS" --summary "${GITHUB_STEP_SUMMARY:-/dev/null}" diff --git a/.github/scripts/run_benchmarks.sh b/.github/scripts/run_benchmarks.sh new file mode 100755 index 00000000..659fea49 --- /dev/null +++ b/.github/scripts/run_benchmarks.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# Copyright 2026 Matt Borland +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt +# +# Builds both benchmark drivers in release mode and runs them, leaving u128.json +# and i128.json in the --out directory. Those two files are exactly what +# doc/render_benchmarks.py consumes. +# +# Run it from the root of a Boost tree that has this library in libs/int128; the +# include path is every libs/*/include in that tree, so no b2 headers step is +# needed. The drivers always exit non-zero (the Jamfile declares them run-fail), +# so success is judged on the data set actually being written. +# +# .github/scripts/run_benchmarks.sh --compiler g++-14 --out /tmp/results +# .github/scripts/run_benchmarks.sh --msvc --elements 5000000 --out C:/results + +set -e + +COMPILER="" +EXTRA_CXXFLAGS="" +EXTRA_LDFLAGS="" +ELEMENTS=20000000 +REPETITIONS=5 +OUT="" +MSVC=0 + +while [ $# -gt 0 ]; do + case "$1" in + --compiler) COMPILER="$2"; shift 2 ;; + --cxxflags) EXTRA_CXXFLAGS="$2"; shift 2 ;; + --ldflags) EXTRA_LDFLAGS="$2"; shift 2 ;; + --elements) ELEMENTS="$2"; shift 2 ;; + --repetitions) REPETITIONS="$2"; shift 2 ;; + --out) OUT="$2"; shift 2 ;; + --msvc) MSVC=1; shift ;; + *) echo "unknown argument: $1" >&2; exit 2 ;; + esac +done + +if [ -z "$OUT" ]; then + echo "error: --out is required" >&2 + exit 2 +fi + +if [ ! -d libs/int128/test ]; then + echo "error: run this from the root of a Boost tree holding libs/int128" >&2 + exit 2 +fi + +mkdir -p "$OUT" + +# Every dependency is header only from the benchmarks' point of view, so the +# include path is simply all of the libraries checked out in this tree. +INCLUDES="" +for dir in libs/*/include libs/*/*/include; do + if [ -d "$dir" ]; then + INCLUDES="$INCLUDES -I$dir" + fi +done + +for sign in u128 i128; do + source_file="libs/int128/test/benchmark_$sign.cpp" + + if [ "$MSVC" = 1 ]; then + # LARGEADDRESSAWARE lets the 32-bit build address more than 2GB, which + # the widest vectors need. + executable="./benchmark_$sign.exe" + # shellcheck disable=SC2086 + cl -nologo -std:c++20 -O2 -EHsc -DNDEBUG $INCLUDES "$source_file" \ + -Fe:"benchmark_$sign.exe" -link -LARGEADDRESSAWARE + else + executable="./benchmark_$sign" + # shellcheck disable=SC2086 + $COMPILER -std=c++20 -O2 -DNDEBUG $EXTRA_CXXFLAGS $INCLUDES "$source_file" \ + -o "benchmark_$sign" $EXTRA_LDFLAGS + fi + + echo "==================== benchmark_$sign ====================" + "$executable" --elements "$ELEMENTS" --repetitions "$REPETITIONS" --json "$OUT/$sign.json" || true + + if [ ! -s "$OUT/$sign.json" ]; then + echo "error: benchmark_$sign did not write $OUT/$sign.json" >&2 + exit 1 + fi +done + +echo "==================== data sets ====================" +ls -l "$OUT" diff --git a/.github/scripts/setup_benchmarks.sh b/.github/scripts/setup_benchmarks.sh new file mode 100755 index 00000000..53554eb5 --- /dev/null +++ b/.github/scripts/setup_benchmarks.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 2026 Matt Borland +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt +# +# Clones a Boost tree next to the checkout, drops this library into it, and +# installs the dependencies the benchmarks need. Exports BOOST_ROOT for the +# steps that follow. Only used by .github/workflows/benchmarks.yml. + +set -e + +LIBRARY=${GITHUB_REPOSITORY#*/} +REF=${GITHUB_BASE_REF:-$GITHUB_REF} +REF=${REF#refs/heads/} + +BOOST_BRANCH=develop +if [ "$REF" = "master" ]; then + BOOST_BRANCH=master +fi + +PYTHON=python3 +if ! command -v python3 > /dev/null 2>&1; then + PYTHON=python +fi + +cd .. +git clone -b "$BOOST_BRANCH" --depth 1 https://github.com/boostorg/boost.git boost-root +cd boost-root +mkdir -p "libs/$LIBRARY" + +# Everything except doc/: it carries an Antora examples symlink that git-bash on +# Windows cannot recreate, plus a node_modules tree that nothing here needs. +for entry in "$GITHUB_WORKSPACE"/*; do + if [ "$(basename "$entry")" != doc ]; then + cp -r "$entry" "libs/$LIBRARY/" + fi +done + +git submodule update --init tools/boostdep +"$PYTHON" tools/boostdep/depinst/depinst.py --git_args "--jobs ${GIT_FETCH_JOBS:-4}" "$LIBRARY" + +echo "BOOST_ROOT=$(pwd)" >> "$GITHUB_ENV" diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml new file mode 100644 index 00000000..5a448f0c --- /dev/null +++ b/.github/workflows/benchmarks.yml @@ -0,0 +1,269 @@ +# ------------------------------------------------------------------------------ +# Copyright Matt Borland 2026. +# Distributed under the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt +# or copy at http://www.boost.org/LICENSE_1_0.txt) +# ------------------------------------------------------------------------------ +# +# Builds and runs test/benchmark_u128.cpp and test/benchmark_i128.cpp in release +# mode across the platforms documented on the two benchmark pages, and uploads +# one benchmarks-- artifact per platform holding u128.json and +# i128.json. +# +# To refresh the documentation: download the artifacts, unpack the +# benchmarks-- folders into doc/modules/ROOT/data, and run +# doc/render_benchmarks.py. It rewrites every table and plot from the data sets, +# taking the platform, compiler, and element count out of the data itself. +# +# The emulated jobs (s390x, ppc64le, ARM32) and the 32-bit jobs measure a smaller +# vector: QEMU is roughly an order of magnitude slower than native, and four +# 128-bit vectors of the default length do not fit in a 32-bit address space. The +# element count lands in the data set and is printed in the documentation, so the +# tables stay honest about what was measured. + +# +# Every pull request gets a full set of runs: the step summary of each job +# compares the fresh numbers against the ones committed under +# doc/modules/ROOT/data, so a regression is visible without downloading +# anything, and the artifacts of that same run are what you unpack to publish +# the new numbers. The comparison never fails a job; these are shared runners +# and a few percent either way is noise. +# +# workflow_dispatch only shows up in the Actions tab once this file is on the +# default branch. Until then, use a pull request (which runs the version of the +# workflow on the branch) or push to a benchmarks/** branch. + +name: Run Benchmarks + +on: + workflow_dispatch: + inputs: + elements: + description: Values per vector on the native 64-bit runners + default: '20000000' + emulated_elements: + description: Values per vector on the emulated runners + default: '2000000' + repetitions: + description: Passes over each vector + default: '5' + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - benchmarks + - benchmarks/** + +# Keyed on the branch rather than the ref so that a new push to a pull request +# cancels the runs still going for the previous one. +concurrency: + group: ${{ format('{0}:{1}:benchmarks', github.repository, github.head_ref || github.ref) }} + cancel-in-progress: true + +env: + GIT_FETCH_JOBS: 8 + ELEMENTS: ${{ inputs.elements || '20000000' }} + EMULATED_ELEMENTS: ${{ inputs.emulated_elements || '2000000' }} + REPETITIONS: ${{ inputs.repetitions || '5' }} + +jobs: + linux: + name: ${{ matrix.title }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + include: + - title: Linux x64 + os: ubuntu-latest + arch: x64 + compiler: g++-14 + packages: g++-14 libabsl-dev + cxxflags: '' + ldflags: '-labsl_int128 -labsl_base' + elements: '' + - title: Linux x86 (32-bit) + os: ubuntu-latest + arch: x86 + compiler: g++-14 + packages: g++-14 g++-14-multilib + cxxflags: '-m32' + ldflags: '' + elements: '10000000' + - title: Linux ARM64 + os: ubuntu-24.04-arm + arch: arm64 + compiler: g++-14 + packages: g++-14 libabsl-dev + cxxflags: '' + ldflags: '-labsl_int128 -labsl_base' + elements: '' + steps: + - uses: actions/checkout@v6 + - name: Install packages + run: | + sudo apt-get -o Acquire::Retries=5 update + sudo apt-get -o Acquire::Retries=5 install -y ${{ matrix.packages }} + - name: Setup Boost + run: .github/scripts/setup_benchmarks.sh + - name: Build and run + run: | + cd "$BOOST_ROOT" + COUNT="${{ matrix.elements }}" + : "${COUNT:=$ELEMENTS}" + "$GITHUB_WORKSPACE/.github/scripts/run_benchmarks.sh" \ + --compiler '${{ matrix.compiler }}' \ + --cxxflags '${{ matrix.cxxflags }}' \ + --ldflags '${{ matrix.ldflags }}' \ + --elements "$COUNT" \ + --repetitions "$REPETITIONS" \ + --out "$GITHUB_WORKSPACE/bench-results" + - name: Compare with the published numbers + run: .github/scripts/compare_benchmarks.sh bench-results + - name: Upload results + uses: actions/upload-artifact@v6 + with: + name: benchmarks-linux-${{ matrix.arch }} + path: bench-results + if-no-files-found: error + + macos: + name: macOS ARM64 + runs-on: macos-latest + defaults: + run: + shell: bash + steps: + - uses: actions/checkout@v6 + - name: Install packages + run: brew install abseil + - name: Setup Boost + run: .github/scripts/setup_benchmarks.sh + - name: Build and run + run: | + cd "$BOOST_ROOT" + PREFIX="$(brew --prefix)" + "$GITHUB_WORKSPACE/.github/scripts/run_benchmarks.sh" \ + --compiler clang++ \ + --cxxflags "-I$PREFIX/include" \ + --ldflags "-L$PREFIX/lib -labsl_int128 -labsl_base" \ + --elements "$ELEMENTS" \ + --repetitions "$REPETITIONS" \ + --out "$GITHUB_WORKSPACE/bench-results" + - name: Compare with the published numbers + run: .github/scripts/compare_benchmarks.sh bench-results + - name: Upload results + uses: actions/upload-artifact@v6 + with: + name: benchmarks-macos-arm64 + path: bench-results + if-no-files-found: error + + windows: + name: ${{ matrix.title }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + include: + - title: Windows x64 + os: windows-latest + arch: x64 + msvc_arch: x64 + elements: '' + - title: Windows x86 (32-bit) + os: windows-latest + arch: x86 + msvc_arch: x86 + elements: '10000000' + - title: Windows ARM64 + os: windows-11-arm + arch: arm64 + msvc_arch: arm64 + elements: '' + steps: + - uses: actions/checkout@v6 + - name: Setup Boost + run: .github/scripts/setup_benchmarks.sh + - uses: TheMrMilchmann/setup-msvc-dev@v4 + with: + arch: ${{ matrix.msvc_arch }} + - name: Build and run + run: | + cd "$BOOST_ROOT" + COUNT="${{ matrix.elements }}" + : "${COUNT:=$ELEMENTS}" + "$GITHUB_WORKSPACE/.github/scripts/run_benchmarks.sh" \ + --msvc \ + --elements "$COUNT" \ + --repetitions "$REPETITIONS" \ + --out "$GITHUB_WORKSPACE/bench-results" + - name: Compare with the published numbers + run: .github/scripts/compare_benchmarks.sh bench-results + - name: Upload results + uses: actions/upload-artifact@v6 + with: + name: benchmarks-windows-${{ matrix.arch }} + path: bench-results + if-no-files-found: error + + emulated: + name: ${{ matrix.title }} + runs-on: ubuntu-latest + timeout-minutes: 360 + defaults: + run: + shell: bash + strategy: + fail-fast: false + matrix: + include: + - title: Linux s390x (emulated) + arch: s390x + platform: linux/s390x + packages: g++ libabsl-dev + ldflags: '-labsl_int128 -labsl_base' + - title: Linux ppc64le (emulated) + arch: ppc64le + platform: linux/ppc64le + packages: g++ + ldflags: '' + - title: Linux ARM32 (emulated) + arch: arm32 + platform: linux/arm/v7 + packages: g++ + ldflags: '' + steps: + - uses: actions/checkout@v6 + - name: Setup Boost + run: .github/scripts/setup_benchmarks.sh + - uses: docker/setup-qemu-action@v4 + - name: Build and run + run: | + # Create the output directory first so that docker does not, as root. + mkdir -p "$GITHUB_WORKSPACE/bench-results" + docker run --rm --platform ${{ matrix.platform }} \ + -v "$BOOST_ROOT":/boost-root \ + -v "$GITHUB_WORKSPACE/.github/scripts":/scripts:ro \ + -v "$GITHUB_WORKSPACE/bench-results":/out \ + -e DEBIAN_FRONTEND=noninteractive \ + -w /boost-root debian:bookworm bash -c " + apt-get -o Acquire::Retries=5 update + apt-get -o Acquire::Retries=5 install -y ${{ matrix.packages }} + /scripts/run_benchmarks.sh --compiler g++ --ldflags '${{ matrix.ldflags }}' \ + --elements $EMULATED_ELEMENTS --repetitions $REPETITIONS --out /out + " + - name: Compare with the published numbers + run: .github/scripts/compare_benchmarks.sh bench-results + - name: Upload results + uses: actions/upload-artifact@v6 + with: + name: benchmarks-linux-${{ matrix.arch }} + path: bench-results + if-no-files-found: error diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json b/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json new file mode 100644 index 00000000..1c7c19a9 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-arm32/i128.json @@ -0,0 +1,143 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "ARM32", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "boost::mp::int128_t", + "implementations": ["int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 134350}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 138077}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 222230}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 217297}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 216908}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 216912}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1149622}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 278729}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 285825}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 299308}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 280007}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 253360}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 277894}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1677063}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 86697}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 923569}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 83835}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1144519}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128954}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2168225}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 2572613}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2921784}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2466122}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2693782}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 9025625}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 15392895}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 11982284}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 13221533}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 160078}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 161518}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 205651}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 204640}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 204467}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 206841}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1143762}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 132801}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 141461}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 209310}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 211931}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 212082}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 212542}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1120664}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85241}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 853523}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 84261}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 786805}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128173}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1455716}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1233721}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2497533}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1250773}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1980038}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 132251}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 135318}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 161514}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 158944}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 158727}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 161057}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 908257}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 97395}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 98065}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 173039}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 178417}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 179433}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 176556}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 903588}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85174}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1367981}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 83658}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1265644}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128209}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1673418}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 5017049}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 8160044}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 5084379}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 7667723}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 132223}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 137506}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 161094}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 158872}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 158867}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 161458}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 910483}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 96907}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 97982}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 120163}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 122889}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 123602}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 121651}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 683654}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 85173}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1315375}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 84214}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1219488}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 128434}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1673819}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 5004822}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 8132982}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 5026178}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 7704325}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 166397}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 169127}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 215562}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 216792}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 216358}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 214771}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1199464}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 154986}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 157386}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 206950}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 210651}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 209776}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 209331}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1149576}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 90313}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1105341}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 83826}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1065408}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 128179}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1710617}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 3477343}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5506901}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 3495645}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 5094644}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 123323}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1295215}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 337779}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 428232} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json b/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json new file mode 100644 index 00000000..3e32f774 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-arm32/u128.json @@ -0,0 +1,149 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "ARM32", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "boost::mp::uint128_t", + "implementations": ["uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 134379}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141343}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 133014}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 132984}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 183283}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 129518}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 858327}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 135825}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 135131}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 270504}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 169292}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 197207}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 232584}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1142287}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85389}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 766402}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83905}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 960055}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128535}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1912473}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2116587}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3581345}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2605169}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3202358}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 9235748}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 17825351}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 12149180}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 13809296}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 158519}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 168311}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 223533}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 257842}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 256611}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 223227}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1288596}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 111101}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 118299}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 170152}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 168970}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 171541}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 171499}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 912095}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85300}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 675836}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83679}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1053537}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128326}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1363954}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1231058}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2779046}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1322017}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2210105}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 130547}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141121}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 127599}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 127631}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 148344}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 123623}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 799324}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 73393}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 74891}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 84092}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 91127}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 130979}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 101400}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 556348}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85277}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1162360}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 83656}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1335382}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128223}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1567199}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 5004368}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 9435352}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 5128364}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 8666811}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 130553}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141128}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 127560}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 127680}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 148152}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 123703}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 799311}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 72683}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 74765}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 79298}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 82812}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 82274}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 79529}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 471895}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85306}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1117033}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 84183}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1261257}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 128219}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1581059}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 5015024}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 9441546}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 5080978}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 8694361}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 189726}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 199325}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 173706}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 179331}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 223638}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 181896}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1148095}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 99631}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 103730}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 133612}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 133587}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 135249}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 132038}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 738322}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 85164}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 970287}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 83783}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1257721}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 128178}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1306808}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 3858870}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 6092878}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 4059654}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 5190052}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 152838}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1267952}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 223346}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 342923}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 56537}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1914860}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 56461}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 980008}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 56443}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 979710} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json new file mode 100644 index 00000000..a3d0638f --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-arm64/i128.json @@ -0,0 +1,271 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "ARM64", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "__int128", + "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 92810}, + {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 92239}, + {"group": "two_word", "operation": "lt", "implementation": "__int128", "microseconds": 242988}, + {"group": "two_word", "operation": "le", "implementation": "__int128", "microseconds": 242255}, + {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 244637}, + {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 244070}, + {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1159153}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 93959}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 93658}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 94106}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 91792}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 93133}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 90845}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 557613}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 327932}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 317258}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 292964}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 283789}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 290141}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 293354}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1805584}, + {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 90714}, + {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 95936}, + {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 240911}, + {"group": "two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 239682}, + {"group": "two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 249326}, + {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 239174}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1155865}, + {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 88108}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 89265}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 175781}, + {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 85922}, + {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 88357}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86946}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 322766}, + {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 84589}, + {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 83740}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 86761}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 194017}, + {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 87777}, + {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 550352}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 592011}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 642713}, + {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 560147}, + {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 559528}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 598346}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 672336}, + {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 552913}, + {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 1264553}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1531117}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 1532307}, + {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 1262547}, + {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 1331800}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1176858}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1326673}, + {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 1331749}, + {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 94381}, + {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 99818}, + {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 261411}, + {"group": "one_word", "operation": "le", "implementation": "__int128", "microseconds": 281897}, + {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 267378}, + {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 265864}, + {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1270872}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 93362}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 93447}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 92168}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 93627}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 102926}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 97595}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 573270}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 328261}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 334685}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 294791}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 293743}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 306734}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 292688}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1851027}, + {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 99726}, + {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 96601}, + {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 308026}, + {"group": "one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 273713}, + {"group": "one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 260918}, + {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 265397}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1304508}, + {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 85737}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 85352}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 378084}, + {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 88824}, + {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 87850}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85238}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 442516}, + {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 91059}, + {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 85492}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 86360}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 194243}, + {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 87837}, + {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 562225}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 330268}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 735908}, + {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 558200}, + {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 548690}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 297050}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 726252}, + {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 542242}, + {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 94231}, + {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 91661}, + {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 88764}, + {"group": "two_one_word", "operation": "le", "implementation": "__int128", "microseconds": 91160}, + {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 96112}, + {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 89252}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 551299}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 91087}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 91450}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 90824}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 90781}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 93442}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 90822}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 548513}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 180933}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 175641}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 168580}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 167965}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 166762}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 168868}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1028861}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 90112}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 91515}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 91970}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 92165}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 92989}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 90578}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 549481}, + {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 84996}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 82149}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 170077}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 83718}, + {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 82952}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 81958}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 170687}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 85156}, + {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 83962}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 84762}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 192107}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 86570}, + {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 747051}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 819306}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 907036}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 745494}, + {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 755976}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 814190}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 877777}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 755490}, + {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 91959}, + {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 93179}, + {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 91210}, + {"group": "one_two_word", "operation": "le", "implementation": "__int128", "microseconds": 89824}, + {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94037}, + {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 91801}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 552142}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 91478}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 90697}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 89118}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 88834}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 90209}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 86919}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 537374}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 185126}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 171807}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 162455}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 162560}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 164047}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 163226}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1009355}, + {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 93054}, + {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 92550}, + {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 89629}, + {"group": "one_two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 88716}, + {"group": "one_two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 91105}, + {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 92219}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 547388}, + {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 84567}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 83491}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 172641}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 85516}, + {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 84074}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 82595}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 175309}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 84927}, + {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 82821}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 83126}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 190585}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 85741}, + {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 747268}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 818962}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 908127}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 744227}, + {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 755923}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 809486}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 880374}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 756424}, + {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 92793}, + {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 92767}, + {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 338915}, + {"group": "random_width", "operation": "le", "implementation": "__int128", "microseconds": 335182}, + {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 341953}, + {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 346719}, + {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 1548448}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 93743}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 93068}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 189078}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 191149}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 223589}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 187857}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 978632}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 427108}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 420579}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 380888}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 377691}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 373834}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 378206}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2358441}, + {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 101443}, + {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 98404}, + {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 351608}, + {"group": "random_width", "operation": "le", "implementation": "absl::int128", "microseconds": 337440}, + {"group": "random_width", "operation": "gt", "implementation": "absl::int128", "microseconds": 340194}, + {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 347625}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 1576854}, + {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 86459}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 87101}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 221898}, + {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 88399}, + {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 87087}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 85946}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 455419}, + {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 86913}, + {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 84919}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 84091}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 187422}, + {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 83956}, + {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 814967}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 767734}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 966484}, + {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 812755}, + {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 839380}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 767831}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 953283}, + {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 841903}, + {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 96550}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 96402}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 196535}, + {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 94459}, + {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 123826}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 125975}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 179188}, + {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 120637} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json new file mode 100644 index 00000000..fe2d1606 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-arm64/u128.json @@ -0,0 +1,275 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "ARM64", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "unsigned __int128", + "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 96801}, + {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 96082}, + {"group": "two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 243543}, + {"group": "two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 239110}, + {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 244191}, + {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 241682}, + {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1161574}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 97805}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 95817}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 94158}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 92586}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 92867}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 94307}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 567670}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 267582}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 273524}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 244110}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 243705}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 243242}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 240731}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1513008}, + {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 99060}, + {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 95700}, + {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 244708}, + {"group": "two_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 239475}, + {"group": "two_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 253045}, + {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 240854}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1172962}, + {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 86249}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88105}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 85598}, + {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 86037}, + {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 86948}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87315}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 86824}, + {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 87684}, + {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86032}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 85119}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 83537}, + {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 86042}, + {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 493501}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 541863}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 521749}, + {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 487186}, + {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 525969}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 562398}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 562015}, + {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 515464}, + {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 1355397}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1574228}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 1354652}, + {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 1364685}, + {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 1321763}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1233252}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1321807}, + {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 1321967}, + {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 92051}, + {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 93937}, + {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 256800}, + {"group": "one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 261267}, + {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 262234}, + {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 277312}, + {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1243734}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 95163}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 93344}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 95720}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 93386}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 95602}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 93001}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 566356}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 272521}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 278180}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 267528}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 270616}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 263357}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 273757}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1626063}, + {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 97822}, + {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 99060}, + {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 251911}, + {"group": "one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 265439}, + {"group": "one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 255697}, + {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 267916}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1237959}, + {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 88077}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 85541}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 85793}, + {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 86958}, + {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 86856}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 89014}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 89227}, + {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 88207}, + {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 85139}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 87745}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 89291}, + {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 89372}, + {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 533785}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 281659}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 564345}, + {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 521453}, + {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 557004}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 273201}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 571544}, + {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 96163}, + {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 97740}, + {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 99260}, + {"group": "two_one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 93762}, + {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 92743}, + {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 96355}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 576158}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 96780}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 93933}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 93654}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95099}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 94698}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 95868}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 570146}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 108534}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 109212}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 96563}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 91327}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 90544}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 92831}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 589126}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 94204}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 94709}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 95971}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 95245}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 95922}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 94882}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 571079}, + {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 89155}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88529}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 87142}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 87942}, + {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 88961}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 88498}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 89095}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 89704}, + {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 89008}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 92265}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 90371}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 90639}, + {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 750350}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 821321}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 769254}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 743601}, + {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 808167}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 826311}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 818923}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 803169}, + {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 93773}, + {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 94523}, + {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 97340}, + {"group": "one_two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 91951}, + {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 91070}, + {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 95221}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 564016}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 102034}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 97014}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 97099}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95353}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 93043}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 93361}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 578018}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 107889}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 113665}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 96942}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 90981}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 89575}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 91579}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 590768}, + {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 89012}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 86165}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 88076}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 87448}, + {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 87915}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87620}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 87610}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 86748}, + {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 84979}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 85988}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 84912}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 87784}, + {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 747812}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 821471}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 770100}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 742130}, + {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 806102}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 827260}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 819027}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 802308}, + {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 95922}, + {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 95308}, + {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 340085}, + {"group": "random_width", "operation": "le", "implementation": "unsigned __int128", "microseconds": 337720}, + {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 338503}, + {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 343466}, + {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 1551148}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 97318}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 95404}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 190356}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 189786}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 189707}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 191920}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 954612}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 363832}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 357504}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 342125}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 342123}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 339635}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 345500}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2090864}, + {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 94406}, + {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 94266}, + {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 342078}, + {"group": "random_width", "operation": "le", "implementation": "absl::uint128", "microseconds": 338799}, + {"group": "random_width", "operation": "gt", "implementation": "absl::uint128", "microseconds": 342883}, + {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 346528}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1559081}, + {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 88531}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 87204}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 87303}, + {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 87544}, + {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 89194}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 90112}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 90873}, + {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 87986}, + {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86854}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 87632}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 88376}, + {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 91189}, + {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 732287}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 652951}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 766334}, + {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 722710}, + {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 768287}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 662783}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 801508}, + {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 758006}, + {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 100133}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 96703}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 102252}, + {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 101008}, + {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 121744}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 122306}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 137232}, + {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 129332}, + {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 90304}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 91037}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 85571}, + {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 85928}, + {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 85344}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 89197}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 86644}, + {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 88350}, + {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 92293}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 96052}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 90375}, + {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 95313} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json new file mode 100644 index 00000000..a4e3c65f --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/i128.json @@ -0,0 +1,207 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "ppc64le", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "__int128", + "implementations": ["__int128", "int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 26864}, + {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 27009}, + {"group": "two_word", "operation": "lt", "implementation": "__int128", "microseconds": 99891}, + {"group": "two_word", "operation": "le", "implementation": "__int128", "microseconds": 98535}, + {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 100523}, + {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 102917}, + {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 459794}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 77762}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39509}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67544}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 64008}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63831}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67331}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 381032}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 364361}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 160359}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 100099}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 105102}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 158090}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 99608}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 989542}, + {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 25189}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 16398}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 141533}, + {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 105040}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14722}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 213498}, + {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 16428}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16394}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 123948}, + {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 553701}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 773416}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 626008}, + {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 571472}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1002259}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 606271}, + {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 799859}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 464233}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 1112953}, + {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 711942}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 306547}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 696290}, + {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 26654}, + {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 26854}, + {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 117819}, + {"group": "one_word", "operation": "le", "implementation": "__int128", "microseconds": 92867}, + {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 90342}, + {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 128999}, + {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 483970}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 206909}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 46406}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 106080}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 68942}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 105957}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 106091}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 640793}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 472771}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 189717}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 168966}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 180580}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 205538}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 167614}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1385641}, + {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 25007}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 16260}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 146183}, + {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 104772}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14608}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 293091}, + {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 16165}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16316}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88763}, + {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 565334}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 338201}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 604060}, + {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 657120}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 481117}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 688930}, + {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 26765}, + {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 26738}, + {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 42601}, + {"group": "two_one_word", "operation": "le", "implementation": "__int128", "microseconds": 40951}, + {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 42781}, + {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 40903}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 221124}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 32010}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39238}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67236}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 63782}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63808}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67391}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 333846}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326994}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 103070}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 82459}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 71271}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 74974}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 83561}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 742841}, + {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 24957}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 16254}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 110034}, + {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 104878}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14652}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 117085}, + {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 16214}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16287}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88624}, + {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 577321}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 502335}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 599187}, + {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 591000}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 676605}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 625565}, + {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 26767}, + {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 26727}, + {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 42636}, + {"group": "one_two_word", "operation": "le", "implementation": "__int128", "microseconds": 40883}, + {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 42691}, + {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 40987}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 221180}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 32082}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 39277}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 67327}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 63742}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 63772}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 67300}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 333966}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326911}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 102816}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 81734}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 71290}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 74854}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 82631}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 740904}, + {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 24994}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 16223}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 109873}, + {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 104652}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 14501}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 117271}, + {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 16208}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 16301}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88677}, + {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 577583}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 456790}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 598170}, + {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 587225}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 593808}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 589766}, + {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 26675}, + {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 26752}, + {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 96469}, + {"group": "random_width", "operation": "le", "implementation": "__int128", "microseconds": 91710}, + {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 91548}, + {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 95090}, + {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 428645}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 97740}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 60478}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 76063}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 75804}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 75196}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 76806}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 462487}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 388496}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 137411}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 122871}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 124370}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 124399}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 123025}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1021098}, + {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 24939}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 16225}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 118021}, + {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 104630}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 14546}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 172685}, + {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 16136}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 16268}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 88742}, + {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 614489}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 509815}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 629501}, + {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 627865}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 686382}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 642930}, + {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 82607}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 39393}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 287824}, + {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 132436}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 128904}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 186647} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json new file mode 100644 index 00000000..f013a1e2 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-ppc64le/u128.json @@ -0,0 +1,216 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "ppc64le", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "unsigned __int128", + "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26830}, + {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26989}, + {"group": "two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 67341}, + {"group": "two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 92773}, + {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 67944}, + {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 71812}, + {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 357540}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 77816}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39310}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53887}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56997}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53426}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53497}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 336050}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 169130}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 82036}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 67392}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 92386}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 68019}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 71497}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 552276}, + {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25099}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16352}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 25100}, + {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25093}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14600}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 25144}, + {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16322}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16404}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16587}, + {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 524951}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 645297}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 479663}, + {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 484689}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 695620}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 544036}, + {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 921021}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 471234}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 767221}, + {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 645581}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 254559}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 644957}, + {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26660}, + {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26778}, + {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 83459}, + {"group": "one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 143735}, + {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 83815}, + {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 175367}, + {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 540328}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 207081}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 91216}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 69327}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 60896}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 60782}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 102399}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 592086}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 260941}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 233740}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 111309}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 144146}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 84244}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 175348}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1010174}, + {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25144}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16289}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 25069}, + {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25085}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14795}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24955}, + {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16193}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16250}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16237}, + {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 534118}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 345292}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 540302}, + {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 612959}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 335049}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 527806}, + {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26695}, + {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26865}, + {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 42707}, + {"group": "two_one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 41118}, + {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 42707}, + {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 40926}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 221456}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 32161}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39223}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53385}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56893}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53243}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53321}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 288637}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 128675}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 64695}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 42673}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 40914}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 42948}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 40855}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 361301}, + {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 24956}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16206}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24971}, + {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25015}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14509}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 25015}, + {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16213}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16351}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16260}, + {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 568862}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 498599}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 580362}, + {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 567562}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 498324}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 571027}, + {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26712}, + {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26780}, + {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 42768}, + {"group": "one_two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 41097}, + {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 42679}, + {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 40857}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 221410}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 32001}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 39253}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 53352}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 56701}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53294}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 53204}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 288281}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 128845}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 62240}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 42701}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 40902}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 42697}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 40932}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 358862}, + {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 24945}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 16211}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24945}, + {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25128}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 14538}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24958}, + {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 16244}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 16369}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16281}, + {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 568591}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 445037}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 578649}, + {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 560923}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 452171}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 570974}, + {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 26732}, + {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 26806}, + {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 91952}, + {"group": "random_width", "operation": "le", "implementation": "unsigned __int128", "microseconds": 88096}, + {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 88204}, + {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 92998}, + {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 415221}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 99375}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 60525}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 72996}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 73720}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 73630}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 72537}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 453245}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 197997}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 131536}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 91715}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 88032}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 88017}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 92685}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 690480}, + {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 25106}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 16257}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 24998}, + {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 25044}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 14548}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 24982}, + {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 17000}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 16304}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 16310}, + {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 581682}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 489550}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 589757}, + {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 581990}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 490872}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 590958}, + {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 83000}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 39488}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 105992}, + {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 123969}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 100428}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 217117}, + {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 18163}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 18064}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 16413}, + {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 18079}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 18170}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 16390}, + {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 18150}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 18059}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 16322} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json b/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json new file mode 100644 index 00000000..8c6c5375 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-s390x/i128.json @@ -0,0 +1,271 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "s390x", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "__int128", + "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 56727}, + {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 57262}, + {"group": "two_word", "operation": "lt", "implementation": "__int128", "microseconds": 102473}, + {"group": "two_word", "operation": "le", "implementation": "__int128", "microseconds": 185360}, + {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 102570}, + {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 118450}, + {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 626091}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81899}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75435}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69586}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 69605}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69540}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69905}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 436946}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 297585}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 383939}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 289701}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 318982}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 324624}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 290134}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1906672}, + {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50337}, + {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50670}, + {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 87172}, + {"group": "two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 98806}, + {"group": "two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 87057}, + {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 98795}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 473776}, + {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 50657}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 44155}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253381}, + {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36856}, + {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 51086}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41560}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 281461}, + {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41423}, + {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 54010}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36548}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150820}, + {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36688}, + {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 711176}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 902634}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 884308}, + {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 710205}, + {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 757463}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 959350}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 825496}, + {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 751829}, + {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 910658}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 533352}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 962878}, + {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 911621}, + {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 1308868}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 470698}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1419660}, + {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 1311482}, + {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 56557}, + {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 57194}, + {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 281637}, + {"group": "one_word", "operation": "le", "implementation": "__int128", "microseconds": 282915}, + {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 283565}, + {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 155161}, + {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 1117414}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 75210}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 220386}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 250258}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 228754}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 248155}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 229071}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1252320}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 348679}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 485819}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 314896}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 344651}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 349420}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 316169}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2160075}, + {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50418}, + {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50533}, + {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 134821}, + {"group": "one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 139686}, + {"group": "one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 131682}, + {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 136664}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 644180}, + {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 50673}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 44432}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 273057}, + {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36949}, + {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 50569}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41340}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 370113}, + {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41290}, + {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 53766}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36509}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150725}, + {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36494}, + {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 801301}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 439455}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 966825}, + {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 802018}, + {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 851725}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 440544}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 889861}, + {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 856274}, + {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 56522}, + {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 57245}, + {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 100943}, + {"group": "two_one_word", "operation": "le", "implementation": "__int128", "microseconds": 149771}, + {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 100623}, + {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 115749}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 581236}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81849}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75332}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69477}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 69268}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69287}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69589}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 435178}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 273946}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 352476}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 260750}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 288767}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 294371}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 257406}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1728211}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50265}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50567}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84583}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 97277}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 84581}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 97052}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 464807}, + {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 50626}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 44162}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253091}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36862}, + {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 50667}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41306}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 281089}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41604}, + {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 53773}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36487}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150619}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36467}, + {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 720219}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 654373}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 894659}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 717749}, + {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 762502}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 678746}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 829480}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757477}, + {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 56507}, + {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 57147}, + {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 100531}, + {"group": "one_two_word", "operation": "le", "implementation": "__int128", "microseconds": 149604}, + {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 100567}, + {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 115820}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 580541}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81783}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 75317}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 69509}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 69400}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 69236}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 69812}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 435437}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 269202}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 352030}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 259880}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 288977}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 294023}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 257600}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1722106}, + {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 50213}, + {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 50548}, + {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84693}, + {"group": "one_two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 97104}, + {"group": "one_two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 84538}, + {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 96999}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 464566}, + {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 50634}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 44066}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 253253}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 36805}, + {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 50696}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 41373}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 282131}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 41352}, + {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 53815}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 36419}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150530}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 36472}, + {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 719639}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 646241}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 894470}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 716229}, + {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 761179}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 678548}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 834617}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757677}, + {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 56807}, + {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 57079}, + {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 160062}, + {"group": "random_width", "operation": "le", "implementation": "__int128", "microseconds": 221174}, + {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 158511}, + {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 131614}, + {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 785777}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 80237}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 117647}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 133763}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 120672}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 127326}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 128756}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 708911}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 326608}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 426773}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 311517}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 338998}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 342167}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 312727}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2059404}, + {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 50285}, + {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 50525}, + {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 103496}, + {"group": "random_width", "operation": "le", "implementation": "absl::int128", "microseconds": 109691}, + {"group": "random_width", "operation": "gt", "implementation": "absl::int128", "microseconds": 99499}, + {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 111341}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 525305}, + {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 50685}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 44057}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 258246}, + {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 37090}, + {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 50668}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 41357}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 303965}, + {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 41352}, + {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 53734}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 36512}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 150617}, + {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 36708}, + {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 752827}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 682729}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 919962}, + {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 752655}, + {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 802322}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 720485}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 851901}, + {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 796760}, + {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 54070}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 50781}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 172707}, + {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 54046}, + {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 69663}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 64780}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 181796}, + {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 69833} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json b/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json new file mode 100644 index 00000000..d9a351aa --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-s390x/u128.json @@ -0,0 +1,275 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "s390x", + "compiler": "GCC 12.2", + "cxxstd": 202002, + "elements": 2000000, + "repetitions": 5, + "baseline": "unsigned __int128", + "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 57495}, + {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57313}, + {"group": "two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 102696}, + {"group": "two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 118212}, + {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 102470}, + {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 118244}, + {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 559538}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81912}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75556}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75872}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66165}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75799}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69252}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 445813}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 185557}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 192243}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 358525}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 118439}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 104782}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 119630}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1080788}, + {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235480}, + {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 230227}, + {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 161688}, + {"group": "two_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 172944}, + {"group": "two_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 162354}, + {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 166922}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1130592}, + {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50741}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44208}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50797}, + {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50678}, + {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50734}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41426}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50649}, + {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53736}, + {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53906}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36529}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50612}, + {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106966}, + {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 614561}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 792604}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 636003}, + {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 685691}, + {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 618877}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 745641}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 639231}, + {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 667796}, + {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 877356}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 485703}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 865957}, + {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 905854}, + {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 1187952}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 385198}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1188209}, + {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 1217091}, + {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56699}, + {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57234}, + {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 147661}, + {"group": "one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 155397}, + {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 147347}, + {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 154939}, + {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 719759}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 75322}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 220203}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 113026}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 110008}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 110264}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 113021}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 742395}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 231581}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 308935}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 375002}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 155312}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 147284}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 155122}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1373694}, + {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235283}, + {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229676}, + {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 208026}, + {"group": "one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 211132}, + {"group": "one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 208121}, + {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 204752}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1297332}, + {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50806}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44074}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50822}, + {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50518}, + {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50608}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41346}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50440}, + {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53564}, + {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53808}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36402}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50639}, + {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106601}, + {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 716138}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 407624}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 736640}, + {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 758885}, + {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 730455}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 410003}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 738935}, + {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56921}, + {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57101}, + {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 100502}, + {"group": "two_one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 115884}, + {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 100504}, + {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 115874}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 547354}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81713}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75377}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75695}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66043}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75540}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69367}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 444215}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 152220}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 168481}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 323079}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 115992}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 100527}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 115724}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 976676}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235523}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229884}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 160914}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 171960}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 160901}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 165786}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1125500}, + {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50913}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44081}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 51030}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50487}, + {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50723}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41412}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50602}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53480}, + {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53729}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36350}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50394}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106855}, + {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 656814}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 545190}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 679933}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 702448}, + {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 671222}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 571953}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 690624}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 718346}, + {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56857}, + {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57359}, + {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 100611}, + {"group": "one_two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 115704}, + {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 100474}, + {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 116171}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 547591}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81801}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 75603}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 76057}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 66202}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 76057}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69314}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 445408}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 152331}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 168375}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 321871}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 115911}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 100499}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 115797}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 975177}, + {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50691}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 44109}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50893}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 50498}, + {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50635}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 41302}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50893}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53572}, + {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53815}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 36396}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50518}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106635}, + {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 656513}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 544792}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 678546}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 702273}, + {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 673970}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 572193}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 690791}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 719162}, + {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 56735}, + {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 57067}, + {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 118918}, + {"group": "random_width", "operation": "le", "implementation": "unsigned __int128", "microseconds": 128877}, + {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 115995}, + {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 131584}, + {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 609693}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 80563}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 117782}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 90604}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 79266}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 89337}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 81156}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 539203}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 213157}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 244537}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 383142}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 128398}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 116128}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 132127}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1218003}, + {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 235736}, + {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 229333}, + {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 176182}, + {"group": "random_width", "operation": "le", "implementation": "absl::uint128", "microseconds": 183915}, + {"group": "random_width", "operation": "gt", "implementation": "absl::uint128", "microseconds": 175008}, + {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 178007}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 1178669}, + {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 50814}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 44087}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 50939}, + {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 50573}, + {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 50584}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 41277}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 50738}, + {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 53373}, + {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53604}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 36614}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 50442}, + {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 106646}, + {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 782276}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 608192}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 813958}, + {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 830929}, + {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 812511}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 607793}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 840997}, + {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 874632}, + {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 54107}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 52548}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 104906}, + {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 89258}, + {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 83670}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 66248}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 111752}, + {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 81776}, + {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 51934}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 50505}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 51912}, + {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 121147}, + {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 51950}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 50695}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 51843}, + {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 120345}, + {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 50519}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 50636}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 50504}, + {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 132533} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json b/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json new file mode 100644 index 00000000..73d194bb --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-x64/i128.json @@ -0,0 +1,271 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "x64", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "__int128", + "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 102391}, + {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 102395}, + {"group": "two_word", "operation": "lt", "implementation": "__int128", "microseconds": 90731}, + {"group": "two_word", "operation": "le", "implementation": "__int128", "microseconds": 94070}, + {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94245}, + {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 90604}, + {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574653}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81177}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89994}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 84390}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 84064}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 83899}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 83022}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 506698}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 374846}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 382438}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 363007}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 109952}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 111908}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360541}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1702868}, + {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 101434}, + {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 88747}, + {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84430}, + {"group": "two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 83147}, + {"group": "two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 82571}, + {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 81642}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 522121}, + {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 65920}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 61808}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 143341}, + {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61955}, + {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 65931}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71163}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 474092}, + {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71211}, + {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 86777}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74570}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 196914}, + {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75043}, + {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 1078930}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1103523}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1009801}, + {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1047021}, + {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 781633}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 867853}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 766518}, + {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 757506}, + {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 581804}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 687098}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 994200}, + {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 606581}, + {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 687745}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 687074}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 695194}, + {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 687922}, + {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 102486}, + {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 102555}, + {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 90722}, + {"group": "one_word", "operation": "le", "implementation": "__int128", "microseconds": 94204}, + {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 94197}, + {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 90667}, + {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574990}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 82191}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89993}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 81959}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 82066}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 84504}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 89306}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 510194}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 387565}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 383804}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 363613}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110071}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110600}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360765}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1716605}, + {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 87593}, + {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 87807}, + {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 83181}, + {"group": "one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 81694}, + {"group": "one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 83475}, + {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83398}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 507310}, + {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 66199}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 61789}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 262369}, + {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61592}, + {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 66035}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71276}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 689871}, + {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71173}, + {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 86781}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74000}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195539}, + {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75062}, + {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 415102}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 486423}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 389401}, + {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 388593}, + {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 414106}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 599197}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 511277}, + {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 388401}, + {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 102198}, + {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 102379}, + {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 90616}, + {"group": "two_one_word", "operation": "le", "implementation": "__int128", "microseconds": 94251}, + {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 94178}, + {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 90520}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574294}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81041}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89153}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 82356}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 81590}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 81586}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 81893}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 497771}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 110474}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 125435}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 102279}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110556}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110586}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 101215}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 660719}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 88509}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 89195}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 84093}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 84731}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 84561}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83304}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 514589}, + {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 66097}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 62691}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 144126}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 62609}, + {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 66014}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71286}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 179874}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71402}, + {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 86792}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 74571}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195821}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 74294}, + {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 545027}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 343997}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 654288}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 505516}, + {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 553185}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 344857}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 699846}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 523339}, + {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 102109}, + {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 102289}, + {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 90528}, + {"group": "one_two_word", "operation": "le", "implementation": "__int128", "microseconds": 94214}, + {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 94305}, + {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 90616}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 574206}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 81043}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 89708}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 84195}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 84083}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 83643}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 83995}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 506815}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 110974}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 126016}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 100292}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110463}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110329}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 101099}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 659342}, + {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 86746}, + {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 87235}, + {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 83669}, + {"group": "one_two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 83298}, + {"group": "one_two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 83113}, + {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 83406}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 507620}, + {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 66053}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 59843}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 143311}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 61114}, + {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 66010}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 71236}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 178688}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 71258}, + {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 86601}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 73840}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 195508}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 74528}, + {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 545464}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 344066}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 654027}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 506277}, + {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 569127}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 344896}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 701083}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 523250}, + {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 102201}, + {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 102463}, + {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 90885}, + {"group": "random_width", "operation": "le", "implementation": "__int128", "microseconds": 94302}, + {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 94445}, + {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 90604}, + {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 575065}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 81127}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 88253}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 82206}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 83247}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 81874}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 83578}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 500451}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 371894}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 381005}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 367895}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 110356}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 110715}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 361118}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1703153}, + {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 87797}, + {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 87663}, + {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 84201}, + {"group": "random_width", "operation": "le", "implementation": "absl::int128", "microseconds": 81191}, + {"group": "random_width", "operation": "gt", "implementation": "absl::int128", "microseconds": 80800}, + {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 81401}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 503204}, + {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 65874}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 60371}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 176054}, + {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 60901}, + {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 65944}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 72082}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 569596}, + {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 71309}, + {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 86629}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 74522}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 196324}, + {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 74967}, + {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 999372}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 978885}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 985280}, + {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 970981}, + {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 940401}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 963188}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1010396}, + {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 918835}, + {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 452496}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 449417}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 187973}, + {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 452632}, + {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 462957}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 459922}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 157373}, + {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 461838} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json b/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json new file mode 100644 index 00000000..b0c2fc9e --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-x64/u128.json @@ -0,0 +1,275 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "x64", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "unsigned __int128", + "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102180}, + {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102201}, + {"group": "two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 74544}, + {"group": "two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 75136}, + {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74739}, + {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74954}, + {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503941}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99148}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 134743}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75844}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 75883}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75728}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75735}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 537246}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 389733}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410653}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74738}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74720}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74940}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74984}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1099931}, + {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98927}, + {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 98655}, + {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76277}, + {"group": "two_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 76690}, + {"group": "two_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 76566}, + {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76480}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 503733}, + {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66072}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 61766}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 66009}, + {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 61818}, + {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65986}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71192}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 69312}, + {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 66692}, + {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86322}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74746}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86343}, + {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75511}, + {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 946171}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 891648}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 981047}, + {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 968211}, + {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 744246}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 697299}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 754132}, + {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 761108}, + {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 734551}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 687104}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 721411}, + {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 718386}, + {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 687412}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 687027}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 687415}, + {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 687498}, + {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102207}, + {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102501}, + {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 74730}, + {"group": "one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 74880}, + {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74798}, + {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74743}, + {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 504031}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98951}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 135152}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75431}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 75639}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75635}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75741}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 536743}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 391268}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410397}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74777}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74799}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74829}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74723}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1100966}, + {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98648}, + {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 101349}, + {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 89346}, + {"group": "one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 76701}, + {"group": "one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 76425}, + {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76502}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 519117}, + {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66042}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60005}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65979}, + {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 61841}, + {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 66307}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71214}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65975}, + {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64268}, + {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86607}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 75219}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86348}, + {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75628}, + {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 353094}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 392174}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 380971}, + {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 381099}, + {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 317709}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 402571}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 317707}, + {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102168}, + {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102209}, + {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 74766}, + {"group": "two_one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 74844}, + {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74668}, + {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74770}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503584}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99005}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 135103}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 76077}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 76022}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75972}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75973}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 538304}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 170939}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 181399}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74831}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 75078}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74760}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74729}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 651890}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 98817}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 98817}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76343}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 76611}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 76570}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76569}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 503898}, + {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66123}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60596}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65947}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 60957}, + {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65905}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71452}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65866}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64344}, + {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86301}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74341}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86398}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 74454}, + {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 516551}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 343719}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 549618}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 549145}, + {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 518088}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 344174}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 531107}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 550184}, + {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 102327}, + {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 102119}, + {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 74690}, + {"group": "one_two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 74840}, + {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 74642}, + {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 74877}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 503666}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98870}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 134243}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 75707}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 76055}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 75961}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 75818}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 536809}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 170136}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 180426}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74714}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74863}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 75011}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 74710}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 650023}, + {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66124}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 60882}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 66471}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 60477}, + {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 66345}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 71197}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65892}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64178}, + {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86252}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 74715}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86366}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 75143}, + {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 517067}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 345744}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 557815}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 548693}, + {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 518752}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 343766}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 520799}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 550093}, + {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 104652}, + {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 103064}, + {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 75897}, + {"group": "random_width", "operation": "le", "implementation": "unsigned __int128", "microseconds": 86149}, + {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 87467}, + {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 80705}, + {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 538116}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 101406}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 139756}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 76147}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 76035}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 76003}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 75612}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 545110}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 390030}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 410462}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 74879}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 74850}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 74745}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 75022}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1100158}, + {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 99083}, + {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 99002}, + {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 76428}, + {"group": "random_width", "operation": "le", "implementation": "absl::uint128", "microseconds": 76631}, + {"group": "random_width", "operation": "gt", "implementation": "absl::uint128", "microseconds": 76513}, + {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 76373}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 504183}, + {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 66230}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 60477}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 65991}, + {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 60608}, + {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 65810}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 71192}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 65943}, + {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 64127}, + {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 86476}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 74446}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 86230}, + {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 74626}, + {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 908484}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 761299}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 940478}, + {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 928884}, + {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 837475}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 697322}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 858246}, + {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 856182}, + {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 452524}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 450311}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 493541}, + {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 450092}, + {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 461906}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 459608}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 489951}, + {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 460259}, + {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 73511}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 66344}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 65909}, + {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 62649}, + {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 65779}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 65826}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 66054}, + {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 62402}, + {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 65919}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 66049}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 66151}, + {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 62279} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json b/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json new file mode 100644 index 00000000..bbe3917f --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-x86/i128.json @@ -0,0 +1,143 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "linux", + "arch": "x86", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 10000000, + "repetitions": 5, + "baseline": "boost::mp::int128_t", + "implementations": ["int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 206732}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 201844}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 238905}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 241413}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 239626}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 259249}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1388042}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 250645}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 264995}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 308256}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 265899}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 254326}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 247423}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1591746}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 190304}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 793455}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 194264}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1109671}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 207054}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1623280}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1803776}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1730520}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1961114}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2005625}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1945944}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 5605530}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1172449}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1724061}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 160497}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 163099}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 201509}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 208734}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 228393}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 245318}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1207756}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 239353}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 247143}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 247898}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 250834}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 251459}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 255974}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1492872}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 193624}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 854728}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 209357}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 942925}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 213098}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1217478}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1041397}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1419785}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 852671}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1179562}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 187811}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 189702}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 224110}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 227138}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 209343}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 214176}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1252469}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 178974}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 178545}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 175817}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 178681}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 177141}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 182037}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1071359}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 148169}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1006479}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 150980}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1055332}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 187906}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1409860}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1473828}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3130361}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1520415}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2966092}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 198033}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 190608}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 223712}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 234831}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 255021}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 258814}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1361237}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 235036}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 242531}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 237766}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 232575}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 221998}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 230367}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1400470}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 177107}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 999331}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 150235}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1052818}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 162625}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1406308}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1474105}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3139189}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1521882}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2965033}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 259046}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 255796}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 320994}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 321884}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 322941}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 322447}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1803323}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 358685}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 350283}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 368821}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 369128}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 358482}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 360790}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2166376}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 159907}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1198244}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 178360}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1416733}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 213890}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1726368}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1711915}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2680645}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1706134}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2539888}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 359283}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1508102}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 431065}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 935102} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json b/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json new file mode 100644 index 00000000..4abaa6d4 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-linux-x86/u128.json @@ -0,0 +1,149 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "linux", + "arch": "x86", + "compiler": "GCC 14.2", + "cxxstd": 202002, + "elements": 10000000, + "repetitions": 5, + "baseline": "boost::mp::uint128_t", + "implementations": ["uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 200888}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 193692}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 222158}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 227645}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 227519}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 222873}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1295053}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 233110}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 246585}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 245769}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 240565}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 247803}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 237422}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1451483}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 197949}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 699561}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 208011}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 828979}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 216433}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1278542}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1539923}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1667096}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1636958}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1669997}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 2126752}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 5883895}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1342484}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 1636937}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 172764}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 165836}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 192707}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 196071}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 194572}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 230567}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1152736}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 226080}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 239707}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 238034}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 239073}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 246198}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 239121}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1428414}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 196541}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 675613}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 202223}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 819395}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 222406}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 890098}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 896995}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1367415}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 747721}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1099155}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 198664}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 193669}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 225050}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 215438}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 220471}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 223561}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1277090}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 237101}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 238512}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 233937}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 235274}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 240901}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 234252}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1420194}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 199771}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 820305}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 153948}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 912704}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 164921}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1072714}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1511993}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3281900}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1501929}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3081208}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 198420}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 195319}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 221136}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 228299}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 225206}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 213353}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1281946}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 231322}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 230158}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 241217}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 252128}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 242163}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 236963}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1434172}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 191943}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 858000}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 199164}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 928124}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 210911}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1182181}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1507080}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3274762}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1493873}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 3079699}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 262905}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 264109}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 400115}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 384551}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 402552}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 397861}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 2112319}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 284531}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 289013}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 276892}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 250781}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 229823}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 237304}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1568536}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 143659}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1144222}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 156320}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1382478}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 203481}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1221882}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1558822}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2170543}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1526280}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1873501}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 373576}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1471433}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 461914}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 788282}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 140836}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1000528}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 141054}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 799976}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 142252}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 804843} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json new file mode 100644 index 00000000..905899d6 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-macos-arm64/i128.json @@ -0,0 +1,271 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "macos", + "arch": "ARM64", + "compiler": "Apple Clang 21.0", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "__int128", + "implementations": ["__int128", "int128_t", "boost::mp::int128_t", "absl::int128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "__int128", "microseconds": 73476}, + {"group": "two_word", "operation": "ne", "implementation": "__int128", "microseconds": 60101}, + {"group": "two_word", "operation": "lt", "implementation": "__int128", "microseconds": 72837}, + {"group": "two_word", "operation": "le", "implementation": "__int128", "microseconds": 62810}, + {"group": "two_word", "operation": "gt", "implementation": "__int128", "microseconds": 65278}, + {"group": "two_word", "operation": "ge", "implementation": "__int128", "microseconds": 62970}, + {"group": "two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 397838}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 103017}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 70747}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 58788}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 68241}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 53835}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 56456}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 411262}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 128842}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 120132}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 166192}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 189449}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 205541}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 160480}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 970791}, + {"group": "two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 64809}, + {"group": "two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 78086}, + {"group": "two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 62129}, + {"group": "two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 65201}, + {"group": "two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 68102}, + {"group": "two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 63494}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 401999}, + {"group": "two_word", "operation": "add", "implementation": "__int128", "microseconds": 59006}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 73178}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 409567}, + {"group": "two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 54699}, + {"group": "two_word", "operation": "sub", "implementation": "__int128", "microseconds": 69502}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 57679}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 419699}, + {"group": "two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 63942}, + {"group": "two_word", "operation": "mul", "implementation": "__int128", "microseconds": 67404}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 56790}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 205690}, + {"group": "two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 60062}, + {"group": "two_word", "operation": "div", "implementation": "__int128", "microseconds": 1149568}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1317759}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1614328}, + {"group": "two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1133300}, + {"group": "two_word", "operation": "mod", "implementation": "__int128", "microseconds": 1282159}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1470751}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1659016}, + {"group": "two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1251267}, + {"group": "two_word", "operation": "div64", "implementation": "__int128", "microseconds": 2229623}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1954282}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 3286996}, + {"group": "two_word", "operation": "div64", "implementation": "absl::int128", "microseconds": 2103592}, + {"group": "two_word", "operation": "div32", "implementation": "__int128", "microseconds": 938883}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 557681}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 1226292}, + {"group": "two_word", "operation": "div32", "implementation": "absl::int128", "microseconds": 975977}, + {"group": "one_word", "operation": "eq", "implementation": "__int128", "microseconds": 77981}, + {"group": "one_word", "operation": "ne", "implementation": "__int128", "microseconds": 73126}, + {"group": "one_word", "operation": "lt", "implementation": "__int128", "microseconds": 73408}, + {"group": "one_word", "operation": "le", "implementation": "__int128", "microseconds": 57564}, + {"group": "one_word", "operation": "gt", "implementation": "__int128", "microseconds": 64805}, + {"group": "one_word", "operation": "ge", "implementation": "__int128", "microseconds": 70196}, + {"group": "one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 417374}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 110608}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 85577}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 55125}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 61920}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 71874}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 62032}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 447779}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 122345}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 96088}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 198669}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 188831}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 220922}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 172761}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 999828}, + {"group": "one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 94704}, + {"group": "one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 101422}, + {"group": "one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 60831}, + {"group": "one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 63744}, + {"group": "one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 62125}, + {"group": "one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 73656}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 456657}, + {"group": "one_word", "operation": "add", "implementation": "__int128", "microseconds": 73888}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 56333}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 429181}, + {"group": "one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 64790}, + {"group": "one_word", "operation": "sub", "implementation": "__int128", "microseconds": 64633}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 59336}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 508577}, + {"group": "one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 65479}, + {"group": "one_word", "operation": "mul", "implementation": "__int128", "microseconds": 69670}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 68957}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 255544}, + {"group": "one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 68925}, + {"group": "one_word", "operation": "div", "implementation": "__int128", "microseconds": 965857}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 746675}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1248135}, + {"group": "one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 862523}, + {"group": "one_word", "operation": "mod", "implementation": "__int128", "microseconds": 941603}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 753248}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1500164}, + {"group": "one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 945527}, + {"group": "two_one_word", "operation": "eq", "implementation": "__int128", "microseconds": 104339}, + {"group": "two_one_word", "operation": "ne", "implementation": "__int128", "microseconds": 72673}, + {"group": "two_one_word", "operation": "lt", "implementation": "__int128", "microseconds": 73421}, + {"group": "two_one_word", "operation": "le", "implementation": "__int128", "microseconds": 85141}, + {"group": "two_one_word", "operation": "gt", "implementation": "__int128", "microseconds": 82091}, + {"group": "two_one_word", "operation": "ge", "implementation": "__int128", "microseconds": 135785}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 553738}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97805}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 70456}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 81018}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 64783}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 73920}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 56601}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 444763}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 235336}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 125649}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 158293}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 205007}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 212302}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 147691}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1084599}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 69760}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 58258}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 69526}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::int128", "microseconds": 85406}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 84271}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 63410}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 430856}, + {"group": "two_one_word", "operation": "add", "implementation": "__int128", "microseconds": 98295}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 89001}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 464442}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::int128", "microseconds": 68244}, + {"group": "two_one_word", "operation": "sub", "implementation": "__int128", "microseconds": 61378}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 61834}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 516184}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 70252}, + {"group": "two_one_word", "operation": "mul", "implementation": "__int128", "microseconds": 70705}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 77657}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 292257}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 86897}, + {"group": "two_one_word", "operation": "div", "implementation": "__int128", "microseconds": 1321540}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1350442}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1902685}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1208431}, + {"group": "two_one_word", "operation": "mod", "implementation": "__int128", "microseconds": 1277355}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1223377}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1960399}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1244970}, + {"group": "one_two_word", "operation": "eq", "implementation": "__int128", "microseconds": 68344}, + {"group": "one_two_word", "operation": "ne", "implementation": "__int128", "microseconds": 63223}, + {"group": "one_two_word", "operation": "lt", "implementation": "__int128", "microseconds": 54640}, + {"group": "one_two_word", "operation": "le", "implementation": "__int128", "microseconds": 62750}, + {"group": "one_two_word", "operation": "gt", "implementation": "__int128", "microseconds": 65436}, + {"group": "one_two_word", "operation": "ge", "implementation": "__int128", "microseconds": 60786}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "__int128", "microseconds": 375394}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 77884}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 60692}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 75333}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 56330}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 47802}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 51713}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 369996}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 212408}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 117919}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 182669}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 186439}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 177522}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 132252}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1009500}, + {"group": "one_two_word", "operation": "eq", "implementation": "absl::int128", "microseconds": 52820}, + {"group": "one_two_word", "operation": "ne", "implementation": "absl::int128", "microseconds": 62624}, + {"group": "one_two_word", "operation": "lt", "implementation": "absl::int128", "microseconds": 55587}, + {"group": "one_two_word", "operation": "le", "implementation": "absl::int128", "microseconds": 51021}, + {"group": "one_two_word", "operation": "gt", "implementation": "absl::int128", "microseconds": 66830}, + {"group": "one_two_word", "operation": "ge", "implementation": "absl::int128", "microseconds": 71032}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 360174}, + {"group": "one_two_word", "operation": "add", "implementation": "__int128", "microseconds": 56406}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 75147}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 428020}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::int128", "microseconds": 63299}, + {"group": "one_two_word", "operation": "sub", "implementation": "__int128", "microseconds": 50998}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 46246}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 456154}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::int128", "microseconds": 59507}, + {"group": "one_two_word", "operation": "mul", "implementation": "__int128", "microseconds": 54984}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 69009}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 229872}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::int128", "microseconds": 75284}, + {"group": "one_two_word", "operation": "div", "implementation": "__int128", "microseconds": 1281193}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1365693}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2086751}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::int128", "microseconds": 1279185}, + {"group": "one_two_word", "operation": "mod", "implementation": "__int128", "microseconds": 1300703}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1368650}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2005592}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::int128", "microseconds": 1307973}, + {"group": "random_width", "operation": "eq", "implementation": "__int128", "microseconds": 71421}, + {"group": "random_width", "operation": "ne", "implementation": "__int128", "microseconds": 63788}, + {"group": "random_width", "operation": "lt", "implementation": "__int128", "microseconds": 69227}, + {"group": "random_width", "operation": "le", "implementation": "__int128", "microseconds": 70713}, + {"group": "random_width", "operation": "gt", "implementation": "__int128", "microseconds": 137680}, + {"group": "random_width", "operation": "ge", "implementation": "__int128", "microseconds": 66115}, + {"group": "random_width", "operation": "comparisons", "implementation": "__int128", "microseconds": 479219}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 68982}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 58046}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 57557}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 67658}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 53944}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 51777}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 358275}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 137971}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 117750}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 165821}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 197630}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 257801}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 157725}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1035078}, + {"group": "random_width", "operation": "eq", "implementation": "absl::int128", "microseconds": 82748}, + {"group": "random_width", "operation": "ne", "implementation": "absl::int128", "microseconds": 66609}, + {"group": "random_width", "operation": "lt", "implementation": "absl::int128", "microseconds": 66824}, + {"group": "random_width", "operation": "le", "implementation": "absl::int128", "microseconds": 60951}, + {"group": "random_width", "operation": "gt", "implementation": "absl::int128", "microseconds": 73267}, + {"group": "random_width", "operation": "ge", "implementation": "absl::int128", "microseconds": 54727}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::int128", "microseconds": 405457}, + {"group": "random_width", "operation": "add", "implementation": "__int128", "microseconds": 152489}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 90873}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 444144}, + {"group": "random_width", "operation": "add", "implementation": "absl::int128", "microseconds": 72358}, + {"group": "random_width", "operation": "sub", "implementation": "__int128", "microseconds": 51306}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 75991}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 383429}, + {"group": "random_width", "operation": "sub", "implementation": "absl::int128", "microseconds": 87675}, + {"group": "random_width", "operation": "mul", "implementation": "__int128", "microseconds": 60826}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 49480}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 205901}, + {"group": "random_width", "operation": "mul", "implementation": "absl::int128", "microseconds": 64798}, + {"group": "random_width", "operation": "div", "implementation": "__int128", "microseconds": 1363999}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1378656}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1893255}, + {"group": "random_width", "operation": "div", "implementation": "absl::int128", "microseconds": 1372411}, + {"group": "random_width", "operation": "mod", "implementation": "__int128", "microseconds": 1534656}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1435001}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2223197}, + {"group": "random_width", "operation": "mod", "implementation": "absl::int128", "microseconds": 1490100}, + {"group": "random_width", "operation": "shl", "implementation": "__int128", "microseconds": 199478}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 139037}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 506876}, + {"group": "random_width", "operation": "shl", "implementation": "absl::int128", "microseconds": 110991}, + {"group": "random_width", "operation": "shr", "implementation": "__int128", "microseconds": 130830}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 109148}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 720869}, + {"group": "random_width", "operation": "shr", "implementation": "absl::int128", "microseconds": 104365} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json new file mode 100644 index 00000000..1a2e37b8 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-macos-arm64/u128.json @@ -0,0 +1,275 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "macos", + "arch": "ARM64", + "compiler": "Apple Clang 21.0", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "unsigned __int128", + "implementations": ["unsigned __int128", "uint128_t", "boost::mp::uint128_t", "absl::uint128"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 60786}, + {"group": "two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 64443}, + {"group": "two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 66744}, + {"group": "two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 81477}, + {"group": "two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 66152}, + {"group": "two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 69586}, + {"group": "two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 409438}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 81896}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 84114}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 64131}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 52577}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 66351}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 66535}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 415911}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 56559}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 67889}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 66209}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 56444}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 66846}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 62253}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 376387}, + {"group": "two_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 76463}, + {"group": "two_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 65337}, + {"group": "two_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 63150}, + {"group": "two_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 71374}, + {"group": "two_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 65695}, + {"group": "two_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 63335}, + {"group": "two_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 405580}, + {"group": "two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 55684}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 67332}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 54281}, + {"group": "two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 52733}, + {"group": "two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 76469}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 60012}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 46709}, + {"group": "two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 61725}, + {"group": "two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 47658}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 40978}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 53387}, + {"group": "two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 55605}, + {"group": "two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 958627}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1154465}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1436461}, + {"group": "two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 990067}, + {"group": "two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1007225}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1163413}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1474333}, + {"group": "two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1029152}, + {"group": "two_word", "operation": "div64", "implementation": "unsigned __int128", "microseconds": 2060983}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1916412}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 2646237}, + {"group": "two_word", "operation": "div64", "implementation": "absl::uint128", "microseconds": 2106147}, + {"group": "two_word", "operation": "div32", "implementation": "unsigned __int128", "microseconds": 616506}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 438747}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 778995}, + {"group": "two_word", "operation": "div32", "implementation": "absl::uint128", "microseconds": 557879}, + {"group": "one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 52857}, + {"group": "one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 52457}, + {"group": "one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 62994}, + {"group": "one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 55301}, + {"group": "one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 55680}, + {"group": "one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62266}, + {"group": "one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 341774}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 58885}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 59616}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 56870}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 53502}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 56789}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 59089}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 345001}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 62430}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 56342}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 121429}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 82364}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 85422}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 59900}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 468231}, + {"group": "one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 67989}, + {"group": "one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 90690}, + {"group": "one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 74748}, + {"group": "one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 56673}, + {"group": "one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 64612}, + {"group": "one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 63930}, + {"group": "one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 418876}, + {"group": "one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 76376}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 49947}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 55011}, + {"group": "one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 66672}, + {"group": "one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 63359}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 49234}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 69777}, + {"group": "one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 70446}, + {"group": "one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 60872}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 56277}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 56845}, + {"group": "one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 50889}, + {"group": "one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 688937}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 548323}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1093889}, + {"group": "one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 667721}, + {"group": "one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 663412}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 491001}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 950134}, + {"group": "two_one_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 54976}, + {"group": "two_one_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 63214}, + {"group": "two_one_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 68055}, + {"group": "two_one_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 71759}, + {"group": "two_one_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 63111}, + {"group": "two_one_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 73310}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 394640}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 86933}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 56313}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 59658}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 57797}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 53082}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 50804}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 364924}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 76026}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 57338}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 51297}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 60913}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 59118}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 57931}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 362816}, + {"group": "two_one_word", "operation": "eq", "implementation": "absl::uint128", "microseconds": 69930}, + {"group": "two_one_word", "operation": "ne", "implementation": "absl::uint128", "microseconds": 53263}, + {"group": "two_one_word", "operation": "lt", "implementation": "absl::uint128", "microseconds": 47902}, + {"group": "two_one_word", "operation": "le", "implementation": "absl::uint128", "microseconds": 64032}, + {"group": "two_one_word", "operation": "gt", "implementation": "absl::uint128", "microseconds": 63028}, + {"group": "two_one_word", "operation": "ge", "implementation": "absl::uint128", "microseconds": 51172}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 349631}, + {"group": "two_one_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 45930}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 45229}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 45220}, + {"group": "two_one_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 46222}, + {"group": "two_one_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 52292}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 48065}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 49447}, + {"group": "two_one_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 60147}, + {"group": "two_one_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 49595}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 65067}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 62332}, + {"group": "two_one_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 56557}, + {"group": "two_one_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1137959}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1222870}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1717067}, + {"group": "two_one_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 1271174}, + {"group": "two_one_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1334879}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1188264}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1764790}, + {"group": "two_one_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1343218}, + {"group": "one_two_word", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 76885}, + {"group": "one_two_word", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 67424}, + {"group": "one_two_word", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 92992}, + {"group": "one_two_word", "operation": "le", "implementation": "unsigned __int128", "microseconds": 77106}, + {"group": "one_two_word", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 57997}, + {"group": "one_two_word", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62133}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 434712}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 80623}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 66188}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 67302}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 62479}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 65322}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 69813}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 411943}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 52093}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 57838}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 54105}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 55315}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 68877}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 66885}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 355334}, + {"group": "one_two_word", "operation": "add", "implementation": "unsigned __int128", "microseconds": 58536}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 77709}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 55825}, + {"group": "one_two_word", "operation": "add", "implementation": "absl::uint128", "microseconds": 52110}, + {"group": "one_two_word", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 71027}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 61288}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 51859}, + {"group": "one_two_word", "operation": "sub", "implementation": "absl::uint128", "microseconds": 57252}, + {"group": "one_two_word", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 53122}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 69045}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 46087}, + {"group": "one_two_word", "operation": "mul", "implementation": "absl::uint128", "microseconds": 56764}, + {"group": "one_two_word", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1296994}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1109370}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1578808}, + {"group": "one_two_word", "operation": "div", "implementation": "absl::uint128", "microseconds": 1196651}, + {"group": "one_two_word", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1302309}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1134083}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1623809}, + {"group": "one_two_word", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1262976}, + {"group": "random_width", "operation": "eq", "implementation": "unsigned __int128", "microseconds": 73300}, + {"group": "random_width", "operation": "ne", "implementation": "unsigned __int128", "microseconds": 51536}, + {"group": "random_width", "operation": "lt", "implementation": "unsigned __int128", "microseconds": 56083}, + {"group": "random_width", "operation": "le", "implementation": "unsigned __int128", "microseconds": 64378}, + {"group": "random_width", "operation": "gt", "implementation": "unsigned __int128", "microseconds": 56088}, + {"group": "random_width", "operation": "ge", "implementation": "unsigned __int128", "microseconds": 62242}, + {"group": "random_width", "operation": "comparisons", "implementation": "unsigned __int128", "microseconds": 363881}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 52898}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 61077}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 61663}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 53087}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 58924}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 63455}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 351327}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 60823}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 64153}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 60861}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 61569}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 77590}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 77781}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 403043}, + {"group": "random_width", "operation": "eq", "implementation": "absl::uint128", "microseconds": 54777}, + {"group": "random_width", "operation": "ne", "implementation": "absl::uint128", "microseconds": 73326}, + {"group": "random_width", "operation": "lt", "implementation": "absl::uint128", "microseconds": 64262}, + {"group": "random_width", "operation": "le", "implementation": "absl::uint128", "microseconds": 55446}, + {"group": "random_width", "operation": "gt", "implementation": "absl::uint128", "microseconds": 68276}, + {"group": "random_width", "operation": "ge", "implementation": "absl::uint128", "microseconds": 57035}, + {"group": "random_width", "operation": "comparisons", "implementation": "absl::uint128", "microseconds": 373414}, + {"group": "random_width", "operation": "add", "implementation": "unsigned __int128", "microseconds": 67797}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 58792}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 64948}, + {"group": "random_width", "operation": "add", "implementation": "absl::uint128", "microseconds": 53003}, + {"group": "random_width", "operation": "sub", "implementation": "unsigned __int128", "microseconds": 49226}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 45231}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 63076}, + {"group": "random_width", "operation": "sub", "implementation": "absl::uint128", "microseconds": 67021}, + {"group": "random_width", "operation": "mul", "implementation": "unsigned __int128", "microseconds": 68952}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 54470}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 64614}, + {"group": "random_width", "operation": "mul", "implementation": "absl::uint128", "microseconds": 59419}, + {"group": "random_width", "operation": "div", "implementation": "unsigned __int128", "microseconds": 1400576}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1477954}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1752490}, + {"group": "random_width", "operation": "div", "implementation": "absl::uint128", "microseconds": 1315311}, + {"group": "random_width", "operation": "mod", "implementation": "unsigned __int128", "microseconds": 1376647}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1462446}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2062026}, + {"group": "random_width", "operation": "mod", "implementation": "absl::uint128", "microseconds": 1672512}, + {"group": "random_width", "operation": "shl", "implementation": "unsigned __int128", "microseconds": 436660}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 132331}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 118733}, + {"group": "random_width", "operation": "shl", "implementation": "absl::uint128", "microseconds": 84840}, + {"group": "random_width", "operation": "shr", "implementation": "unsigned __int128", "microseconds": 136232}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 121592}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 143771}, + {"group": "random_width", "operation": "shr", "implementation": "absl::uint128", "microseconds": 80725}, + {"group": "random_width", "operation": "and", "implementation": "unsigned __int128", "microseconds": 46467}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 59021}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 52932}, + {"group": "random_width", "operation": "and", "implementation": "absl::uint128", "microseconds": 53076}, + {"group": "random_width", "operation": "or", "implementation": "unsigned __int128", "microseconds": 51337}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 54828}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 54796}, + {"group": "random_width", "operation": "or", "implementation": "absl::uint128", "microseconds": 58223}, + {"group": "random_width", "operation": "xor", "implementation": "unsigned __int128", "microseconds": 59883}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 50005}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 44337}, + {"group": "random_width", "operation": "xor", "implementation": "absl::uint128", "microseconds": 49840} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json b/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json new file mode 100644 index 00000000..af9759a9 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-arm64/i128.json @@ -0,0 +1,207 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "windows", + "arch": "ARM64", + "compiler": "MSVC 14.44", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "std::_Signed128", + "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 100222}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 108474}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 105300}, + {"group": "two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 118380}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 116926}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 120792}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 670574}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97530}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 103068}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 104838}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 108207}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113598}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 114446}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 642081}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 207652}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 262103}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 489455}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 493449}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 490611}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 477418}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2421071}, + {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 87229}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 88643}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1318976}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 85935}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86270}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1674347}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506067}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 82019}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2455795}, + {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1026881}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1307573}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2551063}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1286303}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1446105}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2792552}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 2761992}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 1577765}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 8520176}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 1131440}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 1183154}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 3675370}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97330}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98554}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 136462}, + {"group": "one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 147098}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 144510}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 148576}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 772965}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 92953}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 104822}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 135547}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 130967}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 135904}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 136383}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 736968}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 209855}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 257388}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 491415}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 493472}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 489518}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 476588}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2418595}, + {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 86251}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 86666}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1345155}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 86212}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 86134}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1404998}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 505621}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 81402}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1905949}, + {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 462091}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 838271}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1434688}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 744522}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 880466}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1513323}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 102044}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 100393}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 98887}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 118567}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 119721}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 119709}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 659718}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 92176}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 97987}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 108773}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 112245}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113307}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 109162}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 633970}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 176063}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 196559}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 247440}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 246920}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 244052}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 241320}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1352750}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 89432}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 84833}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1472602}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 88620}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85499}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1516699}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506083}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 80945}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2167853}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1768555}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 1531715}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4677254}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2184443}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1509547}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4432211}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 100596}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 104724}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 99626}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 117748}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 118222}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 121375}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 662639}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 96091}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 98817}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 104346}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 113204}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113908}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 111725}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 638399}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 175174}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 192445}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 248600}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 248641}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 244903}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 245032}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1355159}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 89500}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 84797}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1471006}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 85844}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 85481}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1515757}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 506811}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 80841}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2190521}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1767688}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1530445}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4678695}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2182962}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1511529}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4431483}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99541}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 101111}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 257069}, + {"group": "random_width", "operation": "le", "implementation": "std::_Signed128", "microseconds": 241744}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 247939}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 243754}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1191566}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 92235}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 99200}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 226153}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 257049}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 224185}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 226041}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1125261}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 391406}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 395930}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 517486}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 522564}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 523292}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 520699}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2871780}, + {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 86160}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 84055}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1598093}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 88263}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 87934}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1769736}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 505934}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 81566}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2395038}, + {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1506403}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1480602}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3622476}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1722778}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1447734}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3555076}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 321391}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 295187}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1744143}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 314415}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 303113}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1180367} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json b/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json new file mode 100644 index 00000000..a51925cf --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-arm64/u128.json @@ -0,0 +1,216 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "windows", + "arch": "ARM64", + "compiler": "MSVC 14.44", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "std::_Unsigned128", + "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 100360}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 101552}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 102523}, + {"group": "two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 117438}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 120464}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 123267}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 666098}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 94201}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 101220}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 138902}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 141856}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 145539}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 141501}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 763613}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 162195}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 226487}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 455039}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 454108}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 509980}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 460324}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2268555}, + {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 85243}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 88185}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1210617}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 91544}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87401}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1390577}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 455541}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 81048}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1998709}, + {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1040396}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 911416}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2312577}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1226865}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 978268}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2260183}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 2782425}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 1628674}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 8196306}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 1137917}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 1199014}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 3691618}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 92569}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 98239}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 137748}, + {"group": "one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 145330}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 144451}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147857}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 766566}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 99248}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 108100}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 137525}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 136559}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 145550}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 147027}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 774380}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 165125}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 225860}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 454895}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 447587}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 510614}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 462241}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 2266716}, + {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 95555}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 93772}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1090814}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 86278}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 85063}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1323505}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 454907}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 89410}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1427067}, + {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 353794}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 464183}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1216283}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 673643}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 534781}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1265672}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 100045}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 102545}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 102844}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 117753}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 119678}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 124118}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 667393}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 93796}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 102504}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 137236}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 137667}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 143743}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 144346}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 759708}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 127968}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162206}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 173116}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 192679}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 190475}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 173552}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1020437}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 87418}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 87337}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1248195}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 90329}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 86841}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1388005}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 456045}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 81626}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1734186}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1765475}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1026385}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4451739}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 2120280}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 954960}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4187624}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 98930}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 101913}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 104964}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 121407}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 121994}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 126166}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 675754}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 98353}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 106028}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 136914}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 138517}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 142954}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 144139}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 767301}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 127480}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162637}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 170810}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 199572}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 195143}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 173631}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1029634}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 85972}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 87724}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1249922}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 90283}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 87827}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1387555}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 456049}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 97489}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1737327}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1766496}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1027438}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4457200}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 2122346}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 954656}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4188477}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 99891}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 98800}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 287160}, + {"group": "random_width", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 277175}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 254488}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 244334}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1262216}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 91780}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 103496}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 138065}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 137683}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 139323}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 142637}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 753322}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 233263}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 278490}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 295541}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 326875}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 323186}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 299314}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1757122}, + {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 86038}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 84791}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1535904}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 86521}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 87885}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1712929}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 458107}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 82947}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1780541}, + {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1334323}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 920483}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2843970}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1491426}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 915935}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2420312}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 321758}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 310332}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1841484}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 306783}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 345569}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1047658}, + {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 79688}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 86011}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1450863}, + {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 80450}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 85630}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1383602}, + {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 81021}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 85832}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1382799} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json b/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json new file mode 100644 index 00000000..9dfcc630 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-x64/i128.json @@ -0,0 +1,207 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "windows", + "arch": "x64", + "compiler": "MSVC 14.51", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "std::_Signed128", + "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97495}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 95312}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 113650}, + {"group": "two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 116160}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 123457}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 121013}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 667643}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 101883}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 99937}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 116216}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 97760}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 113131}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 102515}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 631930}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 269282}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 254759}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 359854}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 341488}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 341010}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 366251}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1933005}, + {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115772}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 111073}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1620723}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108075}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 108740}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 2107567}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 198154}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 114653}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 3100514}, + {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1090822}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 1163678}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2711779}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1221749}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 1291719}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3170071}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 610230}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 611281}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 9872432}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 609932}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 609887}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 3374887}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 103741}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 104789}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 141945}, + {"group": "one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 142807}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 142440}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 142794}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 778930}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 103637}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 101572}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 121346}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 121731}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 120832}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 119015}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 688546}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 273014}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 257839}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 362908}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 345074}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 345548}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 368476}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1953220}, + {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 116371}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 108525}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1618900}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 110491}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 106162}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1781745}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 197400}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 115300}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2354709}, + {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 600573}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 895385}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 1844891}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 819666}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 969214}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 1941634}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99479}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98439}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 114749}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 115951}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 114376}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 114981}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 658517}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 97184}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 98170}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 114603}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 97205}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 114679}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 100322}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 622582}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 219806}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 238385}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 304845}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 306355}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 303720}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 313890}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1687523}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 114803}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 104457}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1806624}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 109890}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 104679}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1848928}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 196724}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 113169}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2816832}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 603576}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 674930}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5336228}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 644142}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 673970}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4985368}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 99479}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 99015}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 113526}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 114889}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 115012}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 115202}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 657561}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 98572}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 95348}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 113729}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 95252}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 112561}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 98615}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 614494}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 221104}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 240347}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 305976}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 304259}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 303680}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 317493}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1693337}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115722}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 108572}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1797225}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108863}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 104455}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1848277}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 197836}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 112819}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2818948}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 601841}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 675605}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 5323383}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 633730}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 668714}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 5008368}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 97415}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 98415}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 289640}, + {"group": "random_width", "operation": "le", "implementation": "std::_Signed128", "microseconds": 290930}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 290749}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 293934}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1361518}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 98375}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 98496}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 278763}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 259587}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 281881}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 253539}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1271189}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 533768}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 531635}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 809954}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 814279}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 813798}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 811431}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 4315263}, + {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 115135}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 107633}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 2089612}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 108885}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 105990}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 2265849}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 196081}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 113761}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 3024735}, + {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1031262}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 1241974}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4191052}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1080810}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 1327820}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 4139305}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 464726}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 103932}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 2655037}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 473398}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 432674}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1681082} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json b/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json new file mode 100644 index 00000000..bbe2bac8 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-x64/u128.json @@ -0,0 +1,216 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "windows", + "arch": "x64", + "compiler": "MSVC 14.51", + "cxxstd": 202002, + "elements": 20000000, + "repetitions": 5, + "baseline": "std::_Unsigned128", + "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 99690}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 116143}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 101643}, + {"group": "two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 115718}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 106317}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 114639}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 654754}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 114310}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 114871}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 97782}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 104084}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 98415}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 114000}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 643878}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 200390}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 181371}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 214257}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 214424}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 215604}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 191635}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1218167}, + {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 108441}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 102224}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1441775}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 114883}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 95112}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1634898}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 117160}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 114334}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2957779}, + {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1220856}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1062009}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2412835}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1275215}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1211307}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2383395}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 611657}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 614509}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 9023185}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 614595}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 610867}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 3017187}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 97504}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 114033}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 117999}, + {"group": "one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 119909}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 121589}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 123625}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 695180}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 124444}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 141853}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 126322}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 119953}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 111180}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 109911}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 734137}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 188909}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 179914}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 215960}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 213735}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 212586}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 188648}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1200219}, + {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 107074}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 100304}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1267610}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115493}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 94631}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1565102}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 114100}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 112700}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1785347}, + {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 416742}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 730582}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 1593038}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 860796}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 811574}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 1598772}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 98028}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 113216}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 100272}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 116688}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 106586}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 116835}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 652029}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 117223}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 114823}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 101384}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 99924}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 98469}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 115111}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 647378}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 164198}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 164490}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 162760}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 164844}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 165327}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 163970}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 985944}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 107315}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 101098}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1440567}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 118363}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 101239}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1566603}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 113629}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 115814}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2490772}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 474242}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 377992}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4892882}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 458773}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 473292}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4712981}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 93991}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 112260}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 96608}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 114829}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 108021}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 116539}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 642780}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 113310}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 113050}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 99388}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 95552}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 95532}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 112019}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 629316}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 162343}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 162758}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 166459}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 167110}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 167239}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 166512}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 992864}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 106720}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 101810}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1447051}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115651}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 96136}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1562580}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 112725}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 113279}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2486513}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 472632}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 380700}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4898100}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 456450}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 466555}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4735558}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 95539}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 113057}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 261262}, + {"group": "random_width", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 288151}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 272217}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 282306}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1313048}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 119725}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 117316}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 253233}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 244748}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 246018}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 270250}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 1251724}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 315630}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 311524}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 337312}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 336266}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 335893}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 333129}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1970110}, + {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 106229}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 98075}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 2153287}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 115275}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 97252}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 2318242}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 115091}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 112082}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 2428936}, + {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1127057}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 1086078}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 3340168}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1249176}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 1144617}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2721519}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 459629}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 450805}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 2786841}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 448761}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 487842}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1561214}, + {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 93016}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 92138}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1743660}, + {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 95635}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 91902}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1567903}, + {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 89233}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 87982}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1588266} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json b/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json new file mode 100644 index 00000000..8136423b --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-x86/i128.json @@ -0,0 +1,207 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "int128_t", + "sign": "i128", + "os": "windows", + "arch": "x86", + "compiler": "MSVC 14.51", + "cxxstd": 202002, + "elements": 10000000, + "repetitions": 5, + "baseline": "std::_Signed128", + "implementations": ["std::_Signed128", "int128_t", "boost::mp::int128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 108143}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 121480}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 326809}, + {"group": "two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 329212}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 335263}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 321083}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1542717}, + {"group": "two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 114320}, + {"group": "two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 114796}, + {"group": "two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 306476}, + {"group": "two_word", "operation": "le", "implementation": "int128_t", "microseconds": 309236}, + {"group": "two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 306653}, + {"group": "two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 298919}, + {"group": "two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1451173}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 178058}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 175146}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 201981}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 206023}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 206765}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 205535}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1174190}, + {"group": "two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 131534}, + {"group": "two_word", "operation": "add", "implementation": "int128_t", "microseconds": 128545}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 895383}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 448215}, + {"group": "two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 126293}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1216226}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 876906}, + {"group": "two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 150440}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2056075}, + {"group": "two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 1381423}, + {"group": "two_word", "operation": "div", "implementation": "int128_t", "microseconds": 3119530}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 2540283}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1442995}, + {"group": "two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 3245915}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2912618}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Signed128", "microseconds": 6151545}, + {"group": "two_word", "operation": "div64", "implementation": "int128_t", "microseconds": 4890501}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::int128_t", "microseconds": 8378005}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Signed128", "microseconds": 1009750}, + {"group": "two_word", "operation": "div32", "implementation": "int128_t", "microseconds": 2229358}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::int128_t", "microseconds": 2506960}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 111035}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122706}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 313714}, + {"group": "one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 328579}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 327557}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 330703}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 1535024}, + {"group": "one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115297}, + {"group": "one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 115006}, + {"group": "one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 340399}, + {"group": "one_word", "operation": "le", "implementation": "int128_t", "microseconds": 341749}, + {"group": "one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 339001}, + {"group": "one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 348986}, + {"group": "one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1601097}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 182432}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 176358}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 203754}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 206787}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 207307}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 208903}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1186259}, + {"group": "one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 132131}, + {"group": "one_word", "operation": "add", "implementation": "int128_t", "microseconds": 128640}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1063235}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 445868}, + {"group": "one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 127619}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1072151}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 875980}, + {"group": "one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 150148}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1421876}, + {"group": "one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 2780825}, + {"group": "one_word", "operation": "div", "implementation": "int128_t", "microseconds": 2080868}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3067575}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 1769676}, + {"group": "one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2069868}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 2204244}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 110317}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122763}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 143448}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 146344}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 146958}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 147263}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 817741}, + {"group": "two_one_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115277}, + {"group": "two_one_word", "operation": "ne", "implementation": "int128_t", "microseconds": 113121}, + {"group": "two_one_word", "operation": "lt", "implementation": "int128_t", "microseconds": 130912}, + {"group": "two_one_word", "operation": "le", "implementation": "int128_t", "microseconds": 138190}, + {"group": "two_one_word", "operation": "gt", "implementation": "int128_t", "microseconds": 134127}, + {"group": "two_one_word", "operation": "ge", "implementation": "int128_t", "microseconds": 149575}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 781976}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 173523}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 173598}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 199942}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 201513}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 201332}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 201666}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1152250}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 133021}, + {"group": "two_one_word", "operation": "add", "implementation": "int128_t", "microseconds": 130113}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1135020}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 446905}, + {"group": "two_one_word", "operation": "sub", "implementation": "int128_t", "microseconds": 127915}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1157655}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 876507}, + {"group": "two_one_word", "operation": "mul", "implementation": "int128_t", "microseconds": 151060}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1753229}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 4330283}, + {"group": "two_one_word", "operation": "div", "implementation": "int128_t", "microseconds": 2863451}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4399611}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 3164534}, + {"group": "two_one_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2917767}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3890306}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 108192}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 121769}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 141535}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Signed128", "microseconds": 146030}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 147002}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 148116}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 813264}, + {"group": "one_two_word", "operation": "eq", "implementation": "int128_t", "microseconds": 115209}, + {"group": "one_two_word", "operation": "ne", "implementation": "int128_t", "microseconds": 113481}, + {"group": "one_two_word", "operation": "lt", "implementation": "int128_t", "microseconds": 130203}, + {"group": "one_two_word", "operation": "le", "implementation": "int128_t", "microseconds": 138620}, + {"group": "one_two_word", "operation": "gt", "implementation": "int128_t", "microseconds": 126340}, + {"group": "one_two_word", "operation": "ge", "implementation": "int128_t", "microseconds": 143148}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "int128_t", "microseconds": 767531}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 173677}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 172441}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 194442}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 198482}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 198579}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 199208}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 1137542}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Signed128", "microseconds": 132199}, + {"group": "one_two_word", "operation": "add", "implementation": "int128_t", "microseconds": 129425}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1136419}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 448283}, + {"group": "one_two_word", "operation": "sub", "implementation": "int128_t", "microseconds": 125556}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1155766}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 879154}, + {"group": "one_two_word", "operation": "mul", "implementation": "int128_t", "microseconds": 149158}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 1742092}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Signed128", "microseconds": 4358734}, + {"group": "one_two_word", "operation": "div", "implementation": "int128_t", "microseconds": 2884710}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 4412100}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 3185147}, + {"group": "one_two_word", "operation": "mod", "implementation": "int128_t", "microseconds": 2921577}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3914892}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Signed128", "microseconds": 110926}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Signed128", "microseconds": 122126}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Signed128", "microseconds": 472037}, + {"group": "random_width", "operation": "le", "implementation": "std::_Signed128", "microseconds": 473262}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Signed128", "microseconds": 457672}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Signed128", "microseconds": 448069}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Signed128", "microseconds": 2084732}, + {"group": "random_width", "operation": "eq", "implementation": "int128_t", "microseconds": 114341}, + {"group": "random_width", "operation": "ne", "implementation": "int128_t", "microseconds": 114354}, + {"group": "random_width", "operation": "lt", "implementation": "int128_t", "microseconds": 404451}, + {"group": "random_width", "operation": "le", "implementation": "int128_t", "microseconds": 406857}, + {"group": "random_width", "operation": "gt", "implementation": "int128_t", "microseconds": 436327}, + {"group": "random_width", "operation": "ge", "implementation": "int128_t", "microseconds": 469934}, + {"group": "random_width", "operation": "comparisons", "implementation": "int128_t", "microseconds": 1947041}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::int128_t", "microseconds": 448101}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::int128_t", "microseconds": 436992}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::int128_t", "microseconds": 499694}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::int128_t", "microseconds": 502800}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::int128_t", "microseconds": 513811}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::int128_t", "microseconds": 496620}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::int128_t", "microseconds": 2898710}, + {"group": "random_width", "operation": "add", "implementation": "std::_Signed128", "microseconds": 131344}, + {"group": "random_width", "operation": "add", "implementation": "int128_t", "microseconds": 128063}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::int128_t", "microseconds": 1325852}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Signed128", "microseconds": 447258}, + {"group": "random_width", "operation": "sub", "implementation": "int128_t", "microseconds": 128145}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::int128_t", "microseconds": 1454691}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Signed128", "microseconds": 877318}, + {"group": "random_width", "operation": "mul", "implementation": "int128_t", "microseconds": 149394}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::int128_t", "microseconds": 2018981}, + {"group": "random_width", "operation": "div", "implementation": "std::_Signed128", "microseconds": 3479471}, + {"group": "random_width", "operation": "div", "implementation": "int128_t", "microseconds": 3113092}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::int128_t", "microseconds": 3948298}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Signed128", "microseconds": 2683535}, + {"group": "random_width", "operation": "mod", "implementation": "int128_t", "microseconds": 3157295}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::int128_t", "microseconds": 3620409}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Signed128", "microseconds": 731928}, + {"group": "random_width", "operation": "shl", "implementation": "int128_t", "microseconds": 428800}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::int128_t", "microseconds": 1634058}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Signed128", "microseconds": 601309}, + {"group": "random_width", "operation": "shr", "implementation": "int128_t", "microseconds": 595011}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::int128_t", "microseconds": 1144703} + ] +} diff --git a/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json b/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json new file mode 100644 index 00000000..0c01ad74 --- /dev/null +++ b/doc/modules/ROOT/data/benchmarks-windows-x86/u128.json @@ -0,0 +1,216 @@ +{ + "schema": "boost.int128.benchmarks/1", + "type": "uint128_t", + "sign": "u128", + "os": "windows", + "arch": "x86", + "compiler": "MSVC 14.51", + "cxxstd": 202002, + "elements": 10000000, + "repetitions": 5, + "baseline": "std::_Unsigned128", + "implementations": ["std::_Unsigned128", "uint128_t", "boost::mp::uint128_t"], + "results": [ + {"group": "two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 111788}, + {"group": "two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122339}, + {"group": "two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 323060}, + {"group": "two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 325475}, + {"group": "two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 330384}, + {"group": "two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 334949}, + {"group": "two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1548670}, + {"group": "two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 111987}, + {"group": "two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 111075}, + {"group": "two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 107904}, + {"group": "two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 108037}, + {"group": "two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 108826}, + {"group": "two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 108928}, + {"group": "two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 657415}, + {"group": "two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 159671}, + {"group": "two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 158739}, + {"group": "two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 163112}, + {"group": "two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 163280}, + {"group": "two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 166279}, + {"group": "two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 169625}, + {"group": "two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 981366}, + {"group": "two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132260}, + {"group": "two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 130457}, + {"group": "two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 725440}, + {"group": "two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 454180}, + {"group": "two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 127847}, + {"group": "two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 840902}, + {"group": "two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 640255}, + {"group": "two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 849501}, + {"group": "two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1725572}, + {"group": "two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 1303008}, + {"group": "two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2647866}, + {"group": "two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2401610}, + {"group": "two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1407621}, + {"group": "two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2757143}, + {"group": "two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2465767}, + {"group": "two_word", "operation": "div64", "implementation": "std::_Unsigned128", "microseconds": 5939342}, + {"group": "two_word", "operation": "div64", "implementation": "uint128_t", "microseconds": 4769849}, + {"group": "two_word", "operation": "div64", "implementation": "boost::mp::uint128_t", "microseconds": 8809478}, + {"group": "two_word", "operation": "div32", "implementation": "std::_Unsigned128", "microseconds": 907913}, + {"group": "two_word", "operation": "div32", "implementation": "uint128_t", "microseconds": 2077709}, + {"group": "two_word", "operation": "div32", "implementation": "boost::mp::uint128_t", "microseconds": 2168714}, + {"group": "one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109597}, + {"group": "one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122231}, + {"group": "one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 330580}, + {"group": "one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 314128}, + {"group": "one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 329492}, + {"group": "one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 326205}, + {"group": "one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 1533024}, + {"group": "one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 115544}, + {"group": "one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 115732}, + {"group": "one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 114280}, + {"group": "one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 119807}, + {"group": "one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 115487}, + {"group": "one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 120178}, + {"group": "one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 701750}, + {"group": "one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 160131}, + {"group": "one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 156597}, + {"group": "one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 162769}, + {"group": "one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 163931}, + {"group": "one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 164305}, + {"group": "one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 168866}, + {"group": "one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 977193}, + {"group": "one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132141}, + {"group": "one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129407}, + {"group": "one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 706287}, + {"group": "one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 447422}, + {"group": "one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 126486}, + {"group": "one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1141714}, + {"group": "one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 635946}, + {"group": "one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 828587}, + {"group": "one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1038315}, + {"group": "one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 2611033}, + {"group": "one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 1648668}, + {"group": "one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2916830}, + {"group": "one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1683172}, + {"group": "one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 1658140}, + {"group": "one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2094871}, + {"group": "two_one_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109352}, + {"group": "two_one_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122157}, + {"group": "two_one_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 143315}, + {"group": "two_one_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 145669}, + {"group": "two_one_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 146211}, + {"group": "two_one_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147384}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 814792}, + {"group": "two_one_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 111456}, + {"group": "two_one_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 109635}, + {"group": "two_one_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 107279}, + {"group": "two_one_word", "operation": "le", "implementation": "uint128_t", "microseconds": 110132}, + {"group": "two_one_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 107568}, + {"group": "two_one_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 107846}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 654429}, + {"group": "two_one_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 146795}, + {"group": "two_one_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 141890}, + {"group": "two_one_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 142986}, + {"group": "two_one_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 147852}, + {"group": "two_one_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 145872}, + {"group": "two_one_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 155021}, + {"group": "two_one_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 881108}, + {"group": "two_one_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132415}, + {"group": "two_one_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129679}, + {"group": "two_one_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 836745}, + {"group": "two_one_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 448486}, + {"group": "two_one_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 129784}, + {"group": "two_one_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 962373}, + {"group": "two_one_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 640016}, + {"group": "two_one_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 838259}, + {"group": "two_one_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1497013}, + {"group": "two_one_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 4237486}, + {"group": "two_one_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2544129}, + {"group": "two_one_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4572514}, + {"group": "two_one_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 3120280}, + {"group": "two_one_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2700149}, + {"group": "two_one_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4100977}, + {"group": "one_two_word", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109990}, + {"group": "one_two_word", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 122457}, + {"group": "one_two_word", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 146899}, + {"group": "one_two_word", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 146907}, + {"group": "one_two_word", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 146446}, + {"group": "one_two_word", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 147949}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 821440}, + {"group": "one_two_word", "operation": "eq", "implementation": "uint128_t", "microseconds": 112212}, + {"group": "one_two_word", "operation": "ne", "implementation": "uint128_t", "microseconds": 110783}, + {"group": "one_two_word", "operation": "lt", "implementation": "uint128_t", "microseconds": 108143}, + {"group": "one_two_word", "operation": "le", "implementation": "uint128_t", "microseconds": 108439}, + {"group": "one_two_word", "operation": "gt", "implementation": "uint128_t", "microseconds": 108024}, + {"group": "one_two_word", "operation": "ge", "implementation": "uint128_t", "microseconds": 107744}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 655905}, + {"group": "one_two_word", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 145768}, + {"group": "one_two_word", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 141727}, + {"group": "one_two_word", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 143186}, + {"group": "one_two_word", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 147160}, + {"group": "one_two_word", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 148670}, + {"group": "one_two_word", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 154250}, + {"group": "one_two_word", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 881509}, + {"group": "one_two_word", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132212}, + {"group": "one_two_word", "operation": "add", "implementation": "uint128_t", "microseconds": 129563}, + {"group": "one_two_word", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 833087}, + {"group": "one_two_word", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 445284}, + {"group": "one_two_word", "operation": "sub", "implementation": "uint128_t", "microseconds": 128974}, + {"group": "one_two_word", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 954273}, + {"group": "one_two_word", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 635062}, + {"group": "one_two_word", "operation": "mul", "implementation": "uint128_t", "microseconds": 831912}, + {"group": "one_two_word", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1419132}, + {"group": "one_two_word", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 4247013}, + {"group": "one_two_word", "operation": "div", "implementation": "uint128_t", "microseconds": 2537809}, + {"group": "one_two_word", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 4568929}, + {"group": "one_two_word", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 3114097}, + {"group": "one_two_word", "operation": "mod", "implementation": "uint128_t", "microseconds": 2706961}, + {"group": "one_two_word", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 4089359}, + {"group": "random_width", "operation": "eq", "implementation": "std::_Unsigned128", "microseconds": 109078}, + {"group": "random_width", "operation": "ne", "implementation": "std::_Unsigned128", "microseconds": 121623}, + {"group": "random_width", "operation": "lt", "implementation": "std::_Unsigned128", "microseconds": 545990}, + {"group": "random_width", "operation": "le", "implementation": "std::_Unsigned128", "microseconds": 584235}, + {"group": "random_width", "operation": "gt", "implementation": "std::_Unsigned128", "microseconds": 588748}, + {"group": "random_width", "operation": "ge", "implementation": "std::_Unsigned128", "microseconds": 569493}, + {"group": "random_width", "operation": "comparisons", "implementation": "std::_Unsigned128", "microseconds": 2519936}, + {"group": "random_width", "operation": "eq", "implementation": "uint128_t", "microseconds": 222272}, + {"group": "random_width", "operation": "ne", "implementation": "uint128_t", "microseconds": 218961}, + {"group": "random_width", "operation": "lt", "implementation": "uint128_t", "microseconds": 403374}, + {"group": "random_width", "operation": "le", "implementation": "uint128_t", "microseconds": 396483}, + {"group": "random_width", "operation": "gt", "implementation": "uint128_t", "microseconds": 372956}, + {"group": "random_width", "operation": "ge", "implementation": "uint128_t", "microseconds": 391753}, + {"group": "random_width", "operation": "comparisons", "implementation": "uint128_t", "microseconds": 2006459}, + {"group": "random_width", "operation": "eq", "implementation": "boost::mp::uint128_t", "microseconds": 247933}, + {"group": "random_width", "operation": "ne", "implementation": "boost::mp::uint128_t", "microseconds": 257483}, + {"group": "random_width", "operation": "lt", "implementation": "boost::mp::uint128_t", "microseconds": 246619}, + {"group": "random_width", "operation": "le", "implementation": "boost::mp::uint128_t", "microseconds": 249601}, + {"group": "random_width", "operation": "gt", "implementation": "boost::mp::uint128_t", "microseconds": 250095}, + {"group": "random_width", "operation": "ge", "implementation": "boost::mp::uint128_t", "microseconds": 264252}, + {"group": "random_width", "operation": "comparisons", "implementation": "boost::mp::uint128_t", "microseconds": 1516713}, + {"group": "random_width", "operation": "add", "implementation": "std::_Unsigned128", "microseconds": 132021}, + {"group": "random_width", "operation": "add", "implementation": "uint128_t", "microseconds": 129303}, + {"group": "random_width", "operation": "add", "implementation": "boost::mp::uint128_t", "microseconds": 1184928}, + {"group": "random_width", "operation": "sub", "implementation": "std::_Unsigned128", "microseconds": 505196}, + {"group": "random_width", "operation": "sub", "implementation": "uint128_t", "microseconds": 127036}, + {"group": "random_width", "operation": "sub", "implementation": "boost::mp::uint128_t", "microseconds": 1526177}, + {"group": "random_width", "operation": "mul", "implementation": "std::_Unsigned128", "microseconds": 765417}, + {"group": "random_width", "operation": "mul", "implementation": "uint128_t", "microseconds": 960622}, + {"group": "random_width", "operation": "mul", "implementation": "boost::mp::uint128_t", "microseconds": 1459692}, + {"group": "random_width", "operation": "div", "implementation": "std::_Unsigned128", "microseconds": 2510903}, + {"group": "random_width", "operation": "div", "implementation": "uint128_t", "microseconds": 2217091}, + {"group": "random_width", "operation": "div", "implementation": "boost::mp::uint128_t", "microseconds": 2816842}, + {"group": "random_width", "operation": "mod", "implementation": "std::_Unsigned128", "microseconds": 1985290}, + {"group": "random_width", "operation": "mod", "implementation": "uint128_t", "microseconds": 2271454}, + {"group": "random_width", "operation": "mod", "implementation": "boost::mp::uint128_t", "microseconds": 2458916}, + {"group": "random_width", "operation": "shl", "implementation": "std::_Unsigned128", "microseconds": 733372}, + {"group": "random_width", "operation": "shl", "implementation": "uint128_t", "microseconds": 424985}, + {"group": "random_width", "operation": "shl", "implementation": "boost::mp::uint128_t", "microseconds": 1585122}, + {"group": "random_width", "operation": "shr", "implementation": "std::_Unsigned128", "microseconds": 771271}, + {"group": "random_width", "operation": "shr", "implementation": "uint128_t", "microseconds": 547815}, + {"group": "random_width", "operation": "shr", "implementation": "boost::mp::uint128_t", "microseconds": 1045069}, + {"group": "random_width", "operation": "and", "implementation": "std::_Unsigned128", "microseconds": 131113}, + {"group": "random_width", "operation": "and", "implementation": "uint128_t", "microseconds": 131871}, + {"group": "random_width", "operation": "and", "implementation": "boost::mp::uint128_t", "microseconds": 1503443}, + {"group": "random_width", "operation": "or", "implementation": "std::_Unsigned128", "microseconds": 131561}, + {"group": "random_width", "operation": "or", "implementation": "uint128_t", "microseconds": 131184}, + {"group": "random_width", "operation": "or", "implementation": "boost::mp::uint128_t", "microseconds": 1208348}, + {"group": "random_width", "operation": "xor", "implementation": "std::_Unsigned128", "microseconds": 130425}, + {"group": "random_width", "operation": "xor", "implementation": "uint128_t", "microseconds": 130219}, + {"group": "random_width", "operation": "xor", "implementation": "boost::mp::uint128_t", "microseconds": 1235254} + ] +} diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png index c3bcc0cb..c953cca1 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png index f415d0f3..432ec752 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM32_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png index 9763188a..a318ff75 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png index a0850e12..72c791a1 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png index be27885c..614062d9 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png index 9bc0fa08..a857fea6 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/ppc64le_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png index a4acb9e8..ab84cf67 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/s390x_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png index 48b13255..af231478 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/s390x_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png index a617985c..6e4d0bff 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png index ff8ea077..a7db26eb 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png index ba00ac99..c27df94b 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/linux/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png index 070f0ec9..62124061 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/linux/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png index a87c426d..0cd9e6ea 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png index 19eb0bd6..6207b7bd 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/macos/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png index 1771b3af..a1f972a6 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png index 28156d8b..e8d7ba34 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png index d12d4ad9..be430dad 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png index 44cab7da..ae1cab2a 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png b/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png index f6061bff..274251cb 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png and b/doc/modules/ROOT/images/i128_graphs/windows/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png b/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png index 7b05c54e..594fa7e0 100644 Binary files a/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png and b/doc/modules/ROOT/images/i128_graphs/windows/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png index 656c35ad..56fee81e 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png index 43f03412..3001e0f5 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM32_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png index 60353279..e97834a8 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png index c86d7035..2dae8daf 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png index a2142d97..4f869aa3 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png index 6950202b..7b81c797 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/ppc64le_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png index 1f8be96e..f5f10529 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/s390x_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png index db03e704..1ee81d58 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/s390x_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png index 9dfc748e..80276cb6 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png index eb200f34..4a3b08a6 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png index 93b48c97..21e72888 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/linux/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png index 5b498e0e..74afa716 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/linux/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png index 756dc31a..85b2d68c 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png index 36047908..adf8b46c 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/macos/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png index 0ccdcf58..733b8fd2 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png index 75ef018b..fcecd8b0 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/ARM64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png index aa3d9c30..2ace2a53 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/x64_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png index 5dc1c090..0b84b3b9 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/x64_relative_performance.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png b/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png index 038ff287..71f5f4e8 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png and b/doc/modules/ROOT/images/u128_graphs/windows/x86_benchmarks.png differ diff --git a/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png b/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png index 2446939c..c083bfa8 100644 Binary files a/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png and b/doc/modules/ROOT/images/u128_graphs/windows/x86_relative_performance.png differ diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index ddb68e3c..e472d528 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -83,14 +83,17 @@ * xref:config.adoc[] * Benchmarks ** xref:u128_benchmarks.adoc[] +*** xref:u128_benchmarks.adoc#u128_benchmarks_running[Running the Benchmarks] *** xref:u128_benchmarks.adoc#u128_linux[Linux] *** xref:u128_benchmarks.adoc#u128_windows[Windows] *** xref:u128_benchmarks.adoc#u128_mac[macOS] ** xref:i128_benchmarks.adoc[] +*** xref:i128_benchmarks.adoc#i128_benchmarks_running[Running the Benchmarks] *** xref:i128_benchmarks.adoc#i128_linux[Linux] *** xref:i128_benchmarks.adoc#i128_windows[Windows] *** xref:i128_benchmarks.adoc#i128_mac[macOS] * xref:comp_to_multiprecision.adoc[] * xref:design.adoc[] +* xref:release_notes.adoc[] * xref:reference.adoc[] * xref:copyright.adoc[] diff --git a/doc/modules/ROOT/pages/design.adoc b/doc/modules/ROOT/pages/design.adoc index 71f536cf..069f5df0 100644 --- a/doc/modules/ROOT/pages/design.adoc +++ b/doc/modules/ROOT/pages/design.adoc @@ -39,7 +39,9 @@ See xref:mixed_type_ops.adoc[Mixed Type Operations] for the complete result-type == Layout and Alignment Each type is a struct of two 64-bit words, `low` and `high`, whose declaration order depends on the endianness of the target so that the in-memory representation matches a native 128-bit integer. -For `int128_t` the `high` word is signed. +Both words are `std::uint64_t` in both types; `int128_t` interprets the pair as two's complement and exposes `signed_high()` for the sign. +Keeping the two halves the same type is what lets a compiler treat the pair as one wide access, so loops over `int128_t` vectorize instead of being scalarized. +See xref:int128_t.adoc#i128_storage[Storage and signed_high]. When a native 128-bit type is available the struct is over-aligned to match it, except on 32-bit x86 where the native alignment is not forced. == GPU Support diff --git a/doc/modules/ROOT/pages/i128_benchmarks.adoc b/doc/modules/ROOT/pages/i128_benchmarks.adoc index 15a8cfde..ebcba16d 100644 --- a/doc/modules/ROOT/pages/i128_benchmarks.adoc +++ b/doc/modules/ROOT/pages/i128_benchmarks.adoc @@ -10,75 +10,111 @@ https://www.boost.org/LICENSE_1_0.txt == Methodology -The benchmarks below represent the time in microseconds it takes to perform 20'000'000 operations between two values of random width (e.g. 2x1 words, 1x2 words, etc.). +Every cell below is the total time in microseconds that one operation takes over a whole vector of random values, so lower is better. +The vector holds operands of random width (32, 64, 96, or 128 bits, e.g. 2x1 words, 1x2 words), each operation is evaluated as `op(vec[i], vec[i + 1])` across the vector, and the whole vector is walked several times. +Each platform states its element count and pass count, and therefore how many operations a cell covers. +The `Comparisons` row is the total of all six relational operators (`==`, `!=`, `<`, `<=`, `>`, `>=`) over that same vector, which is why it costs roughly six arithmetic rows. + On most platforms we use the builtin `\__int128` as the reference benchmark. When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::int128_t` (abbreviated as `boost::mp::int128_t`) as it is widely used, and known to be portable. On MSVC platforms we use as reference `std::_Signed128` from the header `<__msvc_int128.hpp>` since this is bundled with their compiler. Lastly, when available, the benchmarks are also run with `absl::int128` which is the 128-bit signed integer from the https://abseil.io[Abseil Libraries]. +NOTE: Each platform reports a single run, several of them from shared CI runners, so treat small differences as noise. + +[#i128_benchmarks_running] +== Running the Benchmarks + +The driver is `test/benchmark_i128.cpp`. From a Boost tree with its headers staged (`b2 headers`), build it in release mode and pass `--json` to have it write out a data set: + +[source, shell] +---- +g++ -std=c++20 -O2 -DNDEBUG -I . libs/int128/test/benchmark_i128.cpp -o benchmark_i128 +./benchmark_i128 --json i128.json +---- + +Timings are printed to stderr as they are measured, so a run is readable without the data set. +`--elements` and `--repetitions` shrink the run, which is what the emulated platforms use. + +From the root of a Boost tree, `.github/scripts/run_benchmarks.sh --compiler g++ --out ` builds and runs both drivers exactly as CI does and leaves a complete data set folder behind. It takes its include path from the checked out libraries, so it needs no staged headers. + +The `benchmarks.yml` workflow runs both drivers on every platform documented here and uploads one `benchmarks--` artifact per platform. +It runs on every pull request, and each job's summary compares its fresh numbers against the published ones, so a regression is visible without downloading anything. +To refresh this page, unpack those artifacts into `doc/modules/ROOT/data` and run `doc/render_benchmarks.py`, which rewrites every table and plot below from the data sets. + +// BENCHMARK-RESULTS-GENERATED + [#i128_linux] == Linux === x86_64 -[cols="1,1,1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` -| Comparisons | 2232997 | 1970941 | 5478483 | 1944089 -| Addition | 244246 | 292081 | 650160 | 227720 -| Subtraction | 220957 | 196953 | 1625774 | 315611 -| Multiplication | 433431 | 321168 | 1595688 | 304069 -| Division | 4462364 | 4983165 | 4992819 | 4986970 -| Modulo | 4803576 | 5257406 | 4988844 | 5081814 +| Comparisons | 575,065 | 500,451 | 1,703,153 | 503,204 +| Addition | 65,874 | 60,371 | 176,054 | 60,901 +| Subtraction | 65,944 | 72,082 | 569,596 | 71,309 +| Multiplication | 86,629 | 74,522 | 196,324 | 74,967 +| Division | 999,372 | 978,885 | 985,280 | 970,981 +| Modulo | 940,401 | 963,188 | 1,010,396 | 918,835 |=== image::i128_graphs/linux/x64_relative_performance.png[x64 Relative Performance, width=100%] === ARM64 -[cols="1,1,1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` -| Comparisons | 4115337 | 2169531 | 5914108 | 3725321 -| Addition | 194461 | 196244 | 543680 | 195216 -| Subtraction | 151441 | 97565 | 1161677 | 192729 -| Multiplication | 334847 | 232518 | 904461 | 240980 -| Division | 2403064 | 1848517 | 2493904 | 2431322 -| Modulo | 2235322 | 2159401 | 2535438 | 2321638 +| Comparisons | 1,548,448 | 978,632 | 2,358,441 | 1,576,854 +| Addition | 86,459 | 87,101 | 221,898 | 88,399 +| Subtraction | 87,087 | 85,946 | 455,419 | 86,913 +| Multiplication | 84,919 | 84,091 | 187,422 | 83,956 +| Division | 814,967 | 767,734 | 966,484 | 812,755 +| Modulo | 839,380 | 767,831 | 953,283 | 841,903 |=== image::i128_graphs/linux/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] === S390x -[cols="1,1,1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` -| Comparisons | 5171094 | 5069329 | 7457296 | 5343843 -| Addition | 625328 | 785936 | 1286888 | 670826 -| Subtraction | 667538 | 356865 | 2555881 | 741947 -| Multiplication | 904480 | 729911 | 1562062 | 786829 -| Division | 3758577 | 2211087 | 3095993 | 3940264 -| Modulo | 4218409 | 2330114 | 3684163 | 3849849 +| Comparisons | 785,777 | 708,911 | 2,059,404 | 525,305 +| Addition | 50,685 | 44,057 | 258,246 | 37,090 +| Subtraction | 50,668 | 41,357 | 303,965 | 41,352 +| Multiplication | 53,734 | 36,512 | 150,617 | 36,708 +| Division | 752,827 | 682,729 | 919,962 | 752,655 +| Modulo | 802,322 | 720,485 | 851,901 | 796,760 |=== image::i128_graphs/linux/s390x_relative_performance.png[s390x Relative Performance, width=100%] === PPC64LE -[cols="1,1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `__int128` | `int128_t` | `boost::mp::int128_t` -| Comparisons | 4538094 | 5796198 | 13907323 -| Addition | 221708 | 191841 | 1177034 -| Subtraction | 222629 | 174273 | 1861166 -| Multiplication | 193315 | 191785 | 878393 -| Division | 5607581 | 4669820 | 5616217 -| Modulo | 5623562 | 4750314 | 5641480 +| Comparisons | 428,645 | 462,487 | 1,021,098 +| Addition | 24,939 | 16,225 | 118,021 +| Subtraction | 104,630 | 14,546 | 172,685 +| Multiplication | 16,136 | 16,268 | 88,742 +| Division | 614,489 | 509,815 | 629,501 +| Modulo | 627,865 | 686,382 | 642,930 |=== image::i128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Performance, width=100%] @@ -87,16 +123,18 @@ image::i128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Perfo NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128_t` -[cols="1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). + +[cols="1,>1,>1"] |=== | Operation | `int128_t` | `boost::mp::int128_t` -| Comparisons | 10310201 | 14160000 -| Addition | 786499 | 7379646 -| Subtraction | 907051 | 7890190 -| Multiplication | 855780 | 10826565 -| Division | 10254664 | 24702433 -| Modulo | 10851123 | 17348307 +| Comparisons | 1,803,323 | 2,166,376 +| Addition | 159,907 | 1,198,244 +| Subtraction | 178,360 | 1,416,733 +| Multiplication | 213,890 | 1,726,368 +| Division | 1,711,915 | 2,680,645 +| Modulo | 1,706,134 | 2,539,888 |=== image::i128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, width=100%] @@ -105,16 +143,18 @@ image::i128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, NOTE: This platform has no hardware type so we compare relative to `boost::mp::int128_t` -[cols="1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1"] |=== | Operation | `int128_t` | `boost::mp::int128_t` -| Comparisons | 6149439 | 6432579 -| Addition | 457850 | 5669571 -| Subtraction | 488321 | 7464427 -| Multiplication | 1793874 | 11410321 -| Division | 17738614 | 38956122 -| Modulo | 18064819 | 30144743 +| Comparisons | 1,199,464 | 1,149,576 +| Addition | 90,313 | 1,105,341 +| Subtraction | 83,826 | 1,065,408 +| Multiplication | 128,179 | 1,710,617 +| Division | 3,477,343 | 5,506,901 +| Modulo | 3,495,645 | 5,094,644 |=== image::i128_graphs/linux/ARM32_relative_performance.png[ARM32 Relative Performance, width=100%] @@ -124,67 +164,75 @@ image::i128_graphs/linux/ARM32_relative_performance.png[ARM32 Relative Performan === x86_64 -[cols="1,1,1,1"] +Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` -| Comparisons | 1879694 | 1894168 | 5198915 -| Addition | 141120 | 143877 | 2846799 -| Subtraction | 157649 | 156965 | 3027203 -| Multiplication | 266740 | 138754 | 4080611 -| Division | 1387560 | 1752869 | 6924406 -| Modulo | 1616895 | 1908345 | 6397442 +| Comparisons | 1,361,518 | 1,271,189 | 4,315,263 +| Addition | 115,135 | 107,633 | 2,089,612 +| Subtraction | 108,885 | 105,990 | 2,265,849 +| Multiplication | 196,081 | 113,761 | 3,024,735 +| Division | 1,031,262 | 1,241,974 | 4,191,052 +| Modulo | 1,080,810 | 1,327,820 | 4,139,305 |=== image::i128_graphs/windows/x64_relative_performance.png[x64 Relative Performance, width=100%] === ARM64 -[cols="1,1,1,1"] +Measured with MSVC 14.44 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` -| Comparisons | 991273 | 391918 | 2551137 -| Addition | 34519 | 48953 | 1243326 -| Subtraction | 34184 | 36278 | 1387708 -| Multiplication | 126490 | 36781 | 1632232 -| Division | 1128432 | 1107571 | 2472959 -| Modulo | 1427629 | 1310481 | 2926904 +| Comparisons | 1,191,566 | 1,125,261 | 2,871,780 +| Addition | 86,160 | 84,055 | 1,598,093 +| Subtraction | 88,263 | 87,934 | 1,769,736 +| Multiplication | 505,934 | 81,566 | 2,395,038 +| Division | 1,506,403 | 1,480,602 | 3,622,476 +| Modulo | 1,722,778 | 1,447,734 | 3,555,076 |=== image::i128_graphs/windows/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] === x86_32 -[cols="1,1,1,1"] +Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Signed128` | `int128_t` | `boost::mp::int128_t` -| Comparisons | 3832024 | 3823023 | 5568151 -| Addition | 232554 | 197092 | 3488510 -| Subtraction | 1198377 | 145823 | 4011233 -| Multiplication | 2921104 | 428925 | 6219931 -| Division | 7174578 | 7189000 | 9748526 -| Modulo | 5528639 | 7028725 | 9205892 +| Comparisons | 2,084,732 | 1,947,041 | 2,898,710 +| Addition | 131,344 | 128,063 | 1,325,852 +| Subtraction | 447,258 | 128,145 | 1,454,691 +| Multiplication | 877,318 | 149,394 | 2,018,981 +| Division | 3,479,471 | 3,113,092 | 3,948,298 +| Modulo | 2,683,535 | 3,157,295 | 3,620,409 |=== -image::i128_graphs/windows/x86_relative_performance.png[x86_32 Relative Performance, width=100%] +image::i128_graphs/windows/x86_relative_performance.png[x86 Relative Performance, width=100%] [#i128_mac] == macOS === ARM64 (Apple Silicon) -[cols="1,1,1,1,1"] +Measured with Apple Clang 21.0 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `__int128` | `int128_t` | `boost::mp::int128_t` | `absl::int128` -| Comparisons | 135259 | 134127 | 340037 | 136845 -| Addition | 20399 | 18575 | 169575 | 20429 -| Subtraction | 20156 | 18983 | 168041 | 20875 -| Multiplication | 20654 | 20860 | 69443 | 20651 -| Division | 668004 | 659823 | 976248 | 660963 -| Modulo | 664356 | 662282 | 1026487 | 665474 +| Comparisons | 479,219 | 358,275 | 1,035,078 | 405,457 +| Addition | 152,489 | 90,873 | 444,144 | 72,358 +| Subtraction | 51,306 | 75,991 | 383,429 | 87,675 +| Multiplication | 60,826 | 49,480 | 205,901 | 64,798 +| Division | 1,363,999 | 1,378,656 | 1,893,255 | 1,372,411 +| Modulo | 1,534,656 | 1,435,001 | 2,223,197 | 1,490,100 |=== image::i128_graphs/macos/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] diff --git a/doc/modules/ROOT/pages/int128_t.adoc b/doc/modules/ROOT/pages/int128_t.adoc index cb497177..fc9b432c 100644 --- a/doc/modules/ROOT/pages/int128_t.adoc +++ b/doc/modules/ROOT/pages/int128_t.adoc @@ -23,12 +23,14 @@ struct int128_t { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; - std::int64_t high {}; + std::uint64_t high {}; #else - std::int64_t high {}; + std::uint64_t high {}; std::uint64_t low {}; #endif + BOOST_INT128_HOST_DEVICE constexpr std::int64_t signed_high() const noexcept; + // Constructors, conversion operators, and member operators // documented in detail below... }; @@ -47,6 +49,34 @@ The type provides: * Compound assignment variants of all binary operators * Increment and decrement operators (`++`, `--`) +[#i128_storage] +== Storage and `signed_high` + +Both words are `std::uint64_t`, and the value is interpreted as two's complement across the pair. +The two halves deliberately have the *same* type: when they differ, a compiler's data-reference analysis cannot merge them into one wide access, and loops over `int128_t` come out with shuffles or fully scalarized. +Giving both words the same type makes the signed type generate the same code as `uint128_t`, which has always had uniform words. + +To read the high word as a signed quantity, use `signed_high()`: + +[source, c++] +---- +BOOST_INT128_HOST_DEVICE constexpr std::int64_t signed_high() const noexcept; +---- + +It is a pure reinterpretation of the stored bits and is `constexpr` on all platforms: + +[source, c++] +---- +const boost::int128::int128_t v {-1}; + +v.high; // 0xFFFFFFFFFFFFFFFF, a std::uint64_t +v.signed_high(); // -1, a std::int64_t +---- + +The two-word constructor still takes its high word as `std::int64_t`, so `int128_t{-1, 0}` and `int128_t{INT64_MIN, 0}` are unchanged. + +CAUTION: Code that reads `high` directly and depends on its signedness, such as `value.high < 0`, changes meaning: the comparison is now unsigned and always false. Replace those reads with `value.signed_high() < 0`, or simply compare the value itself (`value < 0`). + [#i128_alignment] == Alignment diff --git a/doc/modules/ROOT/pages/release_notes.adoc b/doc/modules/ROOT/pages/release_notes.adoc new file mode 100644 index 00000000..7fc5e9be --- /dev/null +++ b/doc/modules/ROOT/pages/release_notes.adoc @@ -0,0 +1,65 @@ +//// +Copyright 2026 Matt Borland +Distributed under the Boost Software License, Version 1.0. +https://www.boost.org/LICENSE_1_0.txt +//// + +[#release_notes] += Release Notes +:idprefix: release_notes_ + +== Unreleased + +=== Breaking: `int128_t::high` is now `std::uint64_t` + +`int128_t` previously stored `std::uint64_t low` and `std::int64_t high`. +Both words are now `std::uint64_t`; the value is still interpreted as two's complement across the pair, and no bit of the representation moved. + +The reason is codegen. +When the two halves of the struct have different types, a compiler's data-reference analysis cannot merge them into a single wide access, so loops over `int128_t` are emitted with shuffles or scalarized outright. +Measured with GCC 14 at `-O3 -march=znver3` on `r[i] = x[i] | y[i]` over an `std::array`: + +[cols="1,1,1",options="header"] +|=== +| | before | after +| `\|`, `&`, `^` | 96 instructions, 14 shuffles | 24 instructions, 0 shuffles +| `~` | 74 instructions, 10 shuffles | 20 instructions, 0 shuffles +|=== + +Those are now exactly the numbers `uint128_t` has always produced, since it already had uniform word types. +Scalar code is unaffected or better: `a + b` drops from 20 instructions to 10, `a << n` from 17 to 12, and `a >> n` from 18 to 13. + +==== What still works + +* The two-word constructor is unchanged and still takes its high word as `std::int64_t`, so `int128_t{-1, 0}` and `int128_t{INT64_MIN, 0}` compile and mean exactly what they did. +* `sizeof`, `alignof`, and the in-memory byte order are unchanged. The type remains trivially copyable and standard layout, so anything that `memcpy`s an `int128_t` is unaffected. +* Every operator produces bit-identical results. Conversions to and from `uint128_t` and the native `pass:[__int128]` are unchanged. + +==== What to change + +Code that reads the `high` member and depends on its signedness. +The member is unsigned now, so a sign test on it silently becomes false: + +[source, c++] +---- +// Before: true for negative values. Now always false. +if (value.high < 0) { ... } + +// Use the accessor +if (value.signed_high() < 0) { ... } + +// Or, usually clearer, compare the value +if (value < 0) { ... } +---- + +`signed_high()` is a new public member: + +[source, c++] +---- +BOOST_INT128_HOST_DEVICE constexpr std::int64_t signed_high() const noexcept; +---- + +It is a pure reinterpretation of the stored bits, `constexpr` everywhere, and available on device. +Passing `high` to something expecting a `std::int64_t` also needs it, since the conversion is now the other direction. + +See xref:int128_t.adoc#i128_storage[Storage and signed_high] for details. diff --git a/doc/modules/ROOT/pages/u128_benchmarks.adoc b/doc/modules/ROOT/pages/u128_benchmarks.adoc index d0cfbf92..c183ec3c 100644 --- a/doc/modules/ROOT/pages/u128_benchmarks.adoc +++ b/doc/modules/ROOT/pages/u128_benchmarks.adoc @@ -10,75 +10,111 @@ https://www.boost.org/LICENSE_1_0.txt == Methodology -The benchmarks below represent the time in microseconds it takes to perform 20'000'000 operations between two values of random width (e.g. 2x1 words, 1x2 words, etc.). +Every cell below is the total time in microseconds that one operation takes over a whole vector of random values, so lower is better. +The vector holds operands of random width (32, 64, 96, or 128 bits, e.g. 2x1 words, 1x2 words), each operation is evaluated as `op(vec[i], vec[i + 1])` across the vector, and the whole vector is walked several times. +Each platform states its element count and pass count, and therefore how many operations a cell covers. +The `Comparisons` row is the total of all six relational operators (`==`, `!=`, `<`, `<=`, `>`, `>=`) over that same vector, which is why it costs roughly six arithmetic rows. + On most platforms we use the builtin `unsigned \__int128` as the reference benchmark. When this is unavailable (such as on 32-bit architectures) we use `boost::multiprecision::uint128_t` (abbreviated as `boost::mp::uint128_t`) as it is widely used, and known to be portable. On MSVC platforms we use as reference `std::_Unsigned128` from the header `<__msvc_int128.hpp>` since this is bundled with their compiler. Lastly, when available, the benchmarks are also run with `absl::uint128` which is the 128-bit unsigned integer from the https://abseil.io[Abseil Libraries]. +NOTE: Each platform reports a single run, several of them from shared CI runners, so treat small differences as noise. + +[#u128_benchmarks_running] +== Running the Benchmarks + +The driver is `test/benchmark_u128.cpp`. From a Boost tree with its headers staged (`b2 headers`), build it in release mode and pass `--json` to have it write out a data set: + +[source, shell] +---- +g++ -std=c++20 -O2 -DNDEBUG -I . libs/int128/test/benchmark_u128.cpp -o benchmark_u128 +./benchmark_u128 --json u128.json +---- + +Timings are printed to stderr as they are measured, so a run is readable without the data set. +`--elements` and `--repetitions` shrink the run, which is what the emulated platforms use. + +From the root of a Boost tree, `.github/scripts/run_benchmarks.sh --compiler g++ --out ` builds and runs both drivers exactly as CI does and leaves a complete data set folder behind. It takes its include path from the checked out libraries, so it needs no staged headers. + +The `benchmarks.yml` workflow runs both drivers on every platform documented here and uploads one `benchmarks--` artifact per platform. +It runs on every pull request, and each job's summary compares its fresh numbers against the published ones, so a regression is visible without downloading anything. +To refresh this page, unpack those artifacts into `doc/modules/ROOT/data` and run `doc/render_benchmarks.py`, which rewrites every table and plot below from the data sets. + +// BENCHMARK-RESULTS-GENERATED + [#u128_linux] == Linux === x86_64 -[cols="1,1,1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` -| Comparisons | 2555576 | 2404372 | 3576079 | 2099066 -| Addition | 242772 | 241336 | 328546 | 301186 -| Subtraction | 372481 | 260064 | 287267 | 282908 -| Multiplication | 356366 | 312736 | 326328 | 277284 -| Division | 4481403 | 4498211 | 4602586 | 4290212 -| Modulo | 3965562 | 4506879 | 4487023 | 4247367 +| Comparisons | 538,116 | 545,110 | 1,100,158 | 504,183 +| Addition | 66,230 | 60,477 | 65,991 | 60,608 +| Subtraction | 65,810 | 71,192 | 65,943 | 64,127 +| Multiplication | 86,476 | 74,446 | 86,230 | 74,626 +| Division | 908,484 | 761,299 | 940,478 | 928,884 +| Modulo | 837,475 | 697,322 | 858,246 | 856,182 |=== image::u128_graphs/linux/x64_relative_performance.png[x64 Relative Performance, width=100%] === ARM64 -[cols="1,1,1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` -| Comparisons | 4077924 | 2335044 | 5360167 | 4184235 -| Addition | 137276 | 151553 | 184406 | 151276 -| Subtraction | 155498 | 133470 | 186793 | 149111 -| Multiplication | 218009 | 233811 | 324341 | 293431 -| Division | 2254781 | 1819447 | 2211225 | 2152312 -| Modulo | 2274294 | 1743274 | 2324356 | 2381378 +| Comparisons | 1,551,148 | 954,612 | 2,090,864 | 1,559,081 +| Addition | 88,531 | 87,204 | 87,303 | 87,544 +| Subtraction | 89,194 | 90,112 | 90,873 | 87,986 +| Multiplication | 86,854 | 87,632 | 88,376 | 91,189 +| Division | 732,287 | 652,951 | 766,334 | 722,710 +| Modulo | 768,287 | 662,783 | 801,508 | 758,006 |=== image::u128_graphs/linux/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] === S390x -[cols="1,1,1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` -| Comparisons | 7293935 | 6198402 | 8182815 | 13820009 -| Addition | 636224 | 707436 | 611849 | 1530136 -| Subtraction | 572225 | 350035 | 595266 | 1211168 -| Multiplication | 1040424 | 741789 | 899957 | 1843000 -| Division | 4191637 | 2593472 | 4106663 | 4883553 -| Modulo | 4156643 | 2133029 | 4398856 | 5011442 +| Comparisons | 609,693 | 539,203 | 1,218,003 | 1,178,669 +| Addition | 50,814 | 44,087 | 50,939 | 50,573 +| Subtraction | 50,584 | 41,277 | 50,738 | 53,373 +| Multiplication | 53,604 | 36,614 | 50,442 | 106,646 +| Division | 782,276 | 608,192 | 813,958 | 830,929 +| Modulo | 812,511 | 607,793 | 840,997 | 874,632 |=== image::u128_graphs/linux/s390x_relative_performance.png[s390x Relative Performance, width=100%] === PPC64LE -[cols="1,1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 5242604 | 4450958 | 5704848 -| Addition | 221776 | 193063 | 847504 -| Subtraction | 222894 | 175259 | 786659 -| Multiplication | 194494 | 192929 | 795187 -| Division | 4821119 | 4896360 | 5344637 -| Modulo | 4955570 | 4273487 | 5407877 +| Comparisons | 415,221 | 453,245 | 690,480 +| Addition | 25,106 | 16,257 | 24,998 +| Subtraction | 25,044 | 14,548 | 24,982 +| Multiplication | 17,000 | 16,304 | 16,310 +| Division | 581,682 | 489,550 | 589,757 +| Modulo | 581,990 | 490,872 | 590,958 |=== image::u128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Performance, width=100%] @@ -87,16 +123,18 @@ image::u128_graphs/linux/ppc64le_relative_performance.png[ppc64le Relative Perfo NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128_t` -[cols="1,1,1"] +Measured with GCC 14.2 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). + +[cols="1,>1,>1"] |=== | Operation | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 9545542 | 8582001 -| Addition | 686648 | 7261481 -| Subtraction | 618456 | 7968678 -| Multiplication | 859253 | 6746697 -| Division | 8271920 | 15931092 -| Modulo | 9932867 | 10242720 +| Comparisons | 2,112,319 | 1,568,536 +| Addition | 143,659 | 1,144,222 +| Subtraction | 156,320 | 1,382,478 +| Multiplication | 203,481 | 1,221,882 +| Division | 1,558,822 | 2,170,543 +| Modulo | 1,526,280 | 1,873,501 |=== image::u128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, width=100%] @@ -105,16 +143,18 @@ image::u128_graphs/linux/x86_relative_performance.png[x86 Relative Performance, NOTE: This platform has no hardware type so we compare relative to `boost::mp::uint128_t` -[cols="1,1,1"] +Measured with GCC 12.2 (pass:[C++]20): 5 passes over 2,000,000 element pairs (10,000,000 operations per cell). + +[cols="1,>1,>1"] |=== | Operation | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 5286033 | 4538707 -| Addition | 454715 | 5543856 -| Subtraction | 487190 | 6465126 -| Multiplication | 1471479 | 8246098 -| Division | 19868087 | 32820805 -| Modulo | 20332627 | 27238658 +| Comparisons | 1,148,095 | 738,322 +| Addition | 85,164 | 970,287 +| Subtraction | 83,783 | 1,257,721 +| Multiplication | 128,178 | 1,306,808 +| Division | 3,858,870 | 6,092,878 +| Modulo | 4,059,654 | 5,190,052 |=== image::u128_graphs/linux/ARM32_relative_performance.png[ARM32 Relative Performance, width=100%] @@ -124,67 +164,75 @@ image::u128_graphs/linux/ARM32_relative_performance.png[ARM32 Relative Performan === x86_64 -[cols="1,1,1,1"] +Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 2055229 | 1714007 | 2490543 -| Addition | 152603 | 116444 | 2596037 -| Subtraction | 150576 | 116367 | 2901567 -| Multiplication | 131223 | 123694 | 3300491 -| Division | 1476783 | 1489919 | 4898388 -| Modulo | 1421066 | 1411521 | 3793762 +| Comparisons | 1,313,048 | 1,251,724 | 1,970,110 +| Addition | 106,229 | 98,075 | 2,153,287 +| Subtraction | 115,275 | 97,252 | 2,318,242 +| Multiplication | 115,091 | 112,082 | 2,428,936 +| Division | 1,127,057 | 1,086,078 | 3,340,168 +| Modulo | 1,249,176 | 1,144,617 | 2,721,519 |=== image::u128_graphs/windows/x64_relative_performance.png[x64 Relative Performance, width=100%] === ARM64 -[cols="1,1,1,1"] +Measured with MSVC 14.44 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 945196 | 405891 | 1306884 -| Addition | 37403 | 40039 | 1351728 -| Subtraction | 33927 | 38887 | 1594845 -| Multiplication | 74384 | 46406 | 1281286 -| Division | 992963 | 790846 | 2035065 -| Modulo | 1087702 | 861121 | 1702396 +| Comparisons | 1,262,216 | 753,322 | 1,757,122 +| Addition | 86,038 | 84,791 | 1,535,904 +| Subtraction | 86,521 | 87,885 | 1,712,929 +| Multiplication | 458,107 | 82,947 | 1,780,541 +| Division | 1,334,323 | 920,483 | 2,843,970 +| Modulo | 1,491,426 | 915,935 | 2,420,312 |=== image::u128_graphs/windows/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] === x86_32 -[cols="1,1,1,1"] +Measured with MSVC 14.51 (pass:[C++]20): 5 passes over 10,000,000 element pairs (50,000,000 operations per cell). + +[cols="1,>1,>1,>1"] |=== | Operation | `std::_Unsigned128` | `uint128_t` | `boost::mp::uint128_t` -| Comparisons | 4806287 | 3940703 | 2624013 -| Addition | 254275 | 202421 | 2961566 -| Subtraction | 1322877 | 207351 | 3703369 -| Multiplication | 2327500 | 2312040 | 4375417 -| Division | 5596877 | 5629510 | 6756883 -| Modulo | 4616488 | 5696116 | 6409969 +| Comparisons | 2,519,936 | 2,006,459 | 1,516,713 +| Addition | 132,021 | 129,303 | 1,184,928 +| Subtraction | 505,196 | 127,036 | 1,526,177 +| Multiplication | 765,417 | 960,622 | 1,459,692 +| Division | 2,510,903 | 2,217,091 | 2,816,842 +| Modulo | 1,985,290 | 2,271,454 | 2,458,916 |=== -image::u128_graphs/windows/x86_relative_performance.png[x86_32 Relative Performance, width=100%] +image::u128_graphs/windows/x86_relative_performance.png[x86 Relative Performance, width=100%] [#u128_mac] == macOS === ARM64 (Apple Silicon) -[cols="1,1,1,1,1"] +Measured with Apple Clang 21.0 (pass:[C++]20): 5 passes over 20,000,000 element pairs (100,000,000 operations per cell). + +[cols="1,>1,>1,>1,>1"] |=== | Operation | `unsigned __int128` | `uint128_t` | `boost::mp::uint128_t` | `absl::uint128` -| Comparisons | 134425 | 134742 | 133107 | 135182 -| Addition | 20754 | 18389 | 20653 | 20929 -| Subtraction | 20552 | 18573 | 20590 | 20439 -| Multiplication | 20264 | 20150 | 20181 | 20228 -| Division | 685358 | 740877 | 913877 | 718985 -| Modulo | 733080 | 699666 | 951657 | 719500 +| Comparisons | 363,881 | 351,327 | 403,043 | 373,414 +| Addition | 67,797 | 58,792 | 64,948 | 53,003 +| Subtraction | 49,226 | 45,231 | 63,076 | 67,021 +| Multiplication | 68,952 | 54,470 | 64,614 | 59,419 +| Division | 1,400,576 | 1,477,954 | 1,752,490 | 1,315,311 +| Modulo | 1,376,647 | 1,462,446 | 2,062,026 | 1,672,512 |=== image::u128_graphs/macos/ARM64_relative_performance.png[ARM64 Relative Performance, width=100%] diff --git a/doc/plots.py b/doc/plots.py deleted file mode 100644 index 5196c0ab..00000000 --- a/doc/plots.py +++ /dev/null @@ -1,356 +0,0 @@ -#!/usr/bin/env python3 -"""Generate every Boost.Int128 benchmark graph and write it straight into the -documentation images tree. - -Each entry produces two PNGs whose names match the image:: directives in the -.adoc pages: - - modules/ROOT/images/_graphs//_benchmarks.png - modules/ROOT/images/_graphs//_relative_performance.png - -To refresh a platform's numbers, edit its 'data' block here and re-run; the -right file is overwritten automatically. -""" - -import os - -import matplotlib -matplotlib.use('Agg') # headless backend: write files, never open a window -import matplotlib.pyplot as plt -import numpy as np -import pandas as pd - -# Operation order shared by every dataset (matches the x-axis of all charts). -OPERATIONS = ['Comparisons', 'Addition', 'Subtraction', 'Multiplication', 'Division', 'Modulo'] - -# One entry per published graph. Fields: -# sign : 'u128' (unsigned) or 'i128' (signed) -> selects the *_graphs folder -# os : 'linux' | 'macos' | 'windows' -> selects the sub-folder -# arch : file stem used by the .adoc image:: directives (casing must match the -# image:: targets exactly; ARM stems are always upper-case, e.g. 'ARM64') -# title : chart heading prefix, e.g. 'GCC 14 - x64' -# data : implementation -> timings in microseconds, in OPERATIONS order -# The normalization baseline for the relative chart is detected automatically -# (native type where present, otherwise Boost.Multiprecision). -DATASETS = [ - # ----------------------------- unsigned, Linux ----------------------------- - { - 'sign': 'u128', 'os': 'linux', 'arch': 'x64', 'title': 'GCC 16 - x64', - 'data': { - 'unsigned __int128': [2555576, 242772, 372481, 356366, 4481403, 3965562], - 'uint128_t': [2404372, 241336, 260064, 312736, 4498211, 4506879], - 'boost::mp::uint128_t': [3576079, 328546, 287267, 326328, 4602586, 4487023], - 'absl::uint128': [2099066, 301186, 282908, 277284, 4290212, 4247367], - }, - }, - { - 'sign': 'u128', 'os': 'linux', 'arch': 'ARM64', 'title': 'GCC 13 - ARM64', - 'data': { - 'unsigned __int128': [4077924, 137276, 155498, 218009, 2254781, 2274294], - 'uint128_t': [2335044, 151553, 133470, 233811, 1819447, 1743274], - 'boost::mp::uint128_t': [5360167, 184406, 186793, 324341, 2211225, 2324356], - 'absl::uint128': [4184235, 151276, 149111, 293431, 2152312, 2381378], - }, - }, - { - 'sign': 'u128', 'os': 'linux', 'arch': 's390x', 'title': 'GCC 13 - s390x', - 'data': { - 'unsigned __int128': [7293935, 636224, 572225, 1040424, 4191637, 4156643], - 'uint128_t': [6198402, 707436, 350035, 741789, 2593472, 2133029], - 'boost::mp::uint128_t': [8182815, 611849, 595266, 899957, 4106663, 4398856], - 'absl::uint128': [13820009, 1530136, 1211168, 1843000, 4883553, 5011442], - }, - }, - { - 'sign': 'u128', 'os': 'linux', 'arch': 'ppc64le', 'title': 'GCC 14 - ppc64le', - 'data': { - 'unsigned __int128': [5242604, 221776, 222894, 194494, 4821119, 4955570], - 'uint128_t': [4450958, 193063, 175259, 192929, 4896360, 4273487], - 'boost::mp::uint128_t': [5704848, 847504, 786659, 795187, 5344637, 5407877], - }, - }, - { - 'sign': 'u128', 'os': 'linux', 'arch': 'x86', 'title': 'GCC 16 - x86_32', - 'data': { - 'uint128_t': [9545542, 686648, 618456, 859253, 8271920, 9932867], - 'boost::mp::uint128_t': [8582001, 7261481, 7968678, 6746697, 15931092, 10242720], - }, - }, - { - 'sign': 'u128', 'os': 'linux', 'arch': 'ARM32', 'title': 'GCC 14 - ARM32', - 'data': { - 'uint128_t': [5286033, 454715, 487190, 1471479, 19868087, 20332627], - 'boost::mp::uint128_t': [4538707, 5543856, 6465126, 8246098, 32820805, 27238658], - }, - }, - # ---------------------------- unsigned, Windows ---------------------------- - { - 'sign': 'u128', 'os': 'windows', 'arch': 'x64', 'title': 'MSVC 14.5 - x64', - 'data': { - 'std::_Unsigned128': [2055229, 152603, 150576, 131223, 1476783, 1421066], - 'uint128_t': [1714007, 116444, 116367, 123694, 1489919, 1411521], - 'boost::mp::uint128_t': [2490543, 2596037, 2901567, 3300491, 4898388, 3793762], - }, - }, - { - 'sign': 'u128', 'os': 'windows', 'arch': 'ARM64', 'title': 'MSVC 14.5 - ARM64', - 'data': { - 'std::_Unsigned128': [945196, 37403, 33927, 74384, 992963, 1087702], - 'uint128_t': [405891, 40039, 38887, 46406, 790846, 861121], - 'boost::mp::uint128_t': [1306884, 1351728, 1594845, 1281286, 2035065, 1702396], - }, - }, - { - 'sign': 'u128', 'os': 'windows', 'arch': 'x86', 'title': 'MSVC 14.5 - x86_32', - 'data': { - 'std::_Unsigned128': [4806287, 254275, 1322877, 2327500, 5596877, 4616488], - 'uint128_t': [3940703, 202421, 207351, 2312040, 5629510, 5696116], - 'boost::mp::uint128_t': [2624013, 2961566, 3703369, 4375417, 6756883, 6409969], - }, - }, - # ----------------------------- unsigned, macOS ----------------------------- - { - 'sign': 'u128', 'os': 'macos', 'arch': 'ARM64', 'title': 'Clang 22 - ARM64', - 'data': { - 'unsigned __int128': [134425, 20754, 20552, 20264, 685358, 733080], - 'uint128_t': [134742, 18389, 18573, 20150, 740877, 699666], - 'boost::mp::uint128_t': [133107, 20653, 20590, 20181, 913877, 951657], - 'absl::uint128': [135182, 20929, 20439, 20228, 718985, 719500], - }, - }, - # ------------------------------ signed, Linux ------------------------------ - { - 'sign': 'i128', 'os': 'linux', 'arch': 'x64', 'title': 'GCC 16 - x64', - 'data': { - '`__int128`': [2232997, 244246, 220957, 433431, 4462364, 4803576], - 'int128_t': [1970941, 292081, 196953, 321168, 4983165, 5257406], - 'boost::mp::int128_t': [5478483, 650160, 1625774, 1595688, 4992819, 4988844], - 'absl::int128': [1944089, 227720, 315611, 304069, 4986970, 5081814], - }, - }, - { - 'sign': 'i128', 'os': 'linux', 'arch': 'ARM64', 'title': 'GCC 13 - ARM64', - 'data': { - '`__int128`': [4115337, 194461, 151441, 334847, 2403064, 2235322], - 'int128_t': [2169531, 196244, 97565, 232518, 1848517, 2159401], - 'boost::mp::int128_t': [5914108, 543680, 1161677, 904461, 2493904, 2535438], - 'absl::int128': [3725321, 195216, 192729, 240980, 2431322, 2321638], - }, - }, - { - 'sign': 'i128', 'os': 'linux', 'arch': 's390x', 'title': 'GCC 13 - s390x', - 'data': { - '`__int128`': [5171094, 625328, 667538, 904480, 3758577, 4218409], - 'int128_t': [5069329, 785936, 356865, 729911, 2211087, 2330114], - 'boost::mp::int128_t': [7457296, 1286888, 2555881, 1562062, 3095993, 3684163], - 'absl::int128': [5343843, 670826, 741947, 786829, 3940264, 3849849], - }, - }, - { - 'sign': 'i128', 'os': 'linux', 'arch': 'ppc64le', 'title': 'GCC 14 - ppc64le', - 'data': { - '`__int128`': [4538094, 221708, 222629, 193315, 5607581, 5623562], - 'int128_t': [5796198, 191841, 174273, 191785, 4669820, 4750314], - 'boost::mp::int128_t': [13907323, 1177034, 1861166, 878393, 5616217, 5641480], - }, - }, - { - 'sign': 'i128', 'os': 'linux', 'arch': 'x86', 'title': 'GCC 16 - x86_32', - 'data': { - 'int128_t': [10310201, 786499, 907051, 855780, 10254664, 10851123], - 'boost::mp::int128_t': [14160000, 7379646, 7890190, 10826565, 24702433, 17348307], - }, - }, - { - 'sign': 'i128', 'os': 'linux', 'arch': 'ARM32', 'title': 'GCC 14 - ARM32', - 'data': { - 'int128_t': [6149439, 457850, 488321, 1793874, 17738614, 18064819], - 'boost::mp::int128_t': [6432579, 5669571, 7464427, 11410321, 38956122, 30144743], - }, - }, - # ----------------------------- signed, Windows ----------------------------- - { - 'sign': 'i128', 'os': 'windows', 'arch': 'x64', 'title': 'MSVC 14.5 - x64', - 'data': { - 'std::_Signed128': [1879694, 141120, 157649, 266740, 1387560, 1616895], - 'int128_t': [1894168, 143877, 156965, 138754, 1752869, 1908345], - 'boost::mp::int128_t': [5198915, 2846799, 3027203, 4080611, 6924406, 6397442], - }, - }, - { - 'sign': 'i128', 'os': 'windows', 'arch': 'ARM64', 'title': 'MSVC 14.3 - ARM64', - 'data': { - 'std::_Signed128': [991273, 34519, 34184, 126490, 1128432, 1427629], - 'int128_t': [391918, 48953, 36278, 36781, 1107571, 1310481], - 'boost::mp::int128_t': [2551137, 1243326, 1387708, 1632232, 2472959, 2926904], - }, - }, - { - 'sign': 'i128', 'os': 'windows', 'arch': 'x86', 'title': 'MSVC 14.5 - x86_32', - 'data': { - 'std::_Signed128': [3832024, 232554, 1198377, 2921104, 7174578, 5528639], - 'int128_t': [3823023, 197092, 145823, 428925, 7189000, 7028725], - 'boost::mp::int128_t': [5568151, 3488510, 4011233, 6219931, 9748526, 9205892], - }, - }, - # ------------------------------ signed, macOS ------------------------------ - { - 'sign': 'i128', 'os': 'macos', 'arch': 'ARM64', 'title': 'Clang 22 - ARM64', - 'data': { - '`__int128`': [135259, 20399, 20156, 20654, 668004, 664356], - 'int128_t': [134127, 18575, 18983, 20860, 659823, 662282], - 'boost::mp::int128_t': [340037, 169575, 168041, 69443, 976248, 1026487], - 'absl::int128': [136845, 20429, 20875, 20651, 660963, 665474], - }, - }, -] - -# Bar colors by speed rank within an operation: green best, yellow second, red rest. -RANK_COLORS = {1: '#90EE90', 2: '#FFFFE0'} -SLOW_COLOR = '#FFB6C1' - -# Baseline candidates in priority order; first one present in a dataset wins. -BASELINE_PRIORITY = { - 'u128': ['unsigned __int128', 'std::_Unsigned128', 'boost::mp::uint128_t'], - 'i128': ['`__int128`', '__int128', 'std::_Signed128', 'boost::mp::int128_t'], -} - - -# Pick the column every other implementation is compared against. -def detect_baseline(impls, sign): - for candidate in BASELINE_PRIORITY[sign]: - if candidate in impls: - return candidate - return impls[0] - - -# 1-based speed rank per implementation for one operation row (1 == fastest). -def speed_ranks(values): - return np.argsort(np.argsort(values)) + 1 - - -def color_for_rank(rank): - return RANK_COLORS.get(rank, SLOW_COLOR) - - -# Build the two-panel benchmark figure (linear + log) and save it. -def save_benchmark_chart(df, impls, x, width, title, path): - fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10)) - - # Speed rank (1 == fastest) of each implementation, per operation row. - rank_by_op = [speed_ranks(df.iloc[op][impls].values) for op in range(len(df))] - - # Linear panel: one rank-colored bar per implementation within each operation. - for op_idx, (_, row) in enumerate(df.iterrows()): - ranks = rank_by_op[op_idx] - for j, impl in enumerate(impls): - ax1.bar(x[op_idx] + (j - 1) * width, row[impl], width, - color=color_for_rank(ranks[j]), edgecolor='black', linewidth=0.5, - label=impl if op_idx == 0 else "") - ax1.text(x[op_idx] + (j - 1) * width, row[impl], f'{row[impl]:,}', - ha='center', va='bottom', fontsize=8, rotation=90) - - ax1.set_xlabel('Operations', fontsize=12) - ax1.set_ylabel('Time (microseconds)', fontsize=12) - ax1.set_title(f'{title} Benchmark Results', fontsize=14, fontweight='bold') - ax1.set_xticks(x) - ax1.set_xticklabels(OPERATIONS, rotation=45, ha='right') - ax1.legend(loc='upper left') - ax1.grid(axis='y', alpha=0.3) - - # Log panel: same bars and rank colors, log y-axis for the wide dynamic range. - # Draw once per implementation (carries the legend label), then recolor each - # bar by its rank so the legend entry stays attached. - for j, impl in enumerate(impls): - bars = ax2.bar(x + (j - 1) * width, df[impl], width, label=impl, - edgecolor='black', linewidth=0.5) - for op_idx, bar in enumerate(bars): - bar.set_facecolor(color_for_rank(rank_by_op[op_idx][j])) - - ax2.set_xlabel('Operations', fontsize=12) - ax2.set_ylabel('Time (microseconds) - Log Scale', fontsize=12) - ax2.set_title(f'{title} Benchmark Results (Log Scale)', fontsize=14, fontweight='bold') - ax2.set_yscale('log') - ax2.set_xticks(x) - ax2.set_xticklabels(OPERATIONS, rotation=45, ha='right') - ax2.legend(loc='upper left') - ax2.grid(axis='y', alpha=0.3, which='both') - - fig.tight_layout() - fig.savefig(path, dpi=300, bbox_inches='tight') - plt.close(fig) - - -# Build the relative-performance figure (everything normalized to baseline) and save it. -def save_relative_chart(df, impls, x, width, title, baseline, path): - fig, ax = plt.subplots(figsize=(10, 6)) - - normalized = df[impls].div(df[baseline], axis=0) - for i, impl in enumerate(impls): - if impl == baseline: - continue - bars = ax.bar(x + (i - 1.5) * width, normalized[impl], width, - label=impl, edgecolor='black', linewidth=0.5) - for bar in bars: - height = bar.get_height() - ax.text(bar.get_x() + bar.get_width() / 2., height, - f'{height:.2f}x', ha='center', va='bottom', fontsize=9) - - # Headroom above the tallest bar so its value label and the "lower is better" - # note in the top-left corner never collide with the bars. - plotted = [impl for impl in impls if impl != baseline] - tallest = float(normalized[plotted].to_numpy().max()) - ax.set_ylim(top=max(tallest * 1.20, 1.12)) - - ax.axhline(y=1.0, color='red', linestyle='--', alpha=0.5, - label=f'{baseline} baseline') - ax.set_xlabel('Operations', fontsize=12) - ax.set_ylabel(f'Relative Performance (vs {baseline})', fontsize=12) - ax.set_title(f'Relative Performance Comparison - {title}', fontsize=14, fontweight='bold') - ax.set_xticks(x) - ax.set_xticklabels(OPERATIONS, rotation=45, ha='right') - ax.legend() - ax.grid(axis='y', alpha=0.3) - ax.text(0.02, 0.98, 'Lower is better', transform=ax.transAxes, - fontsize=10, verticalalignment='top', style='italic') - - fig.tight_layout() - fig.savefig(path, dpi=300, bbox_inches='tight') - plt.close(fig) - - -# Render and save both charts for a single dataset; return the two output paths. -def render_dataset(entry, images_dir): - impls = list(entry['data'].keys()) - df = pd.DataFrame({'Operation': OPERATIONS, **entry['data']}) - baseline = detect_baseline(impls, entry['sign']) - - x = np.arange(len(OPERATIONS)) - width = 0.25 - - out_dir = os.path.join(images_dir, f"{entry['sign']}_graphs", entry['os']) - os.makedirs(out_dir, exist_ok=True) - bench_path = os.path.join(out_dir, f"{entry['arch']}_benchmarks.png") - rel_path = os.path.join(out_dir, f"{entry['arch']}_relative_performance.png") - - save_benchmark_chart(df, impls, x, width, entry['title'], bench_path) - save_relative_chart(df, impls, x, width, entry['title'], baseline, rel_path) - return bench_path, rel_path - - -def main(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - images_dir = os.path.join(script_dir, 'modules', 'ROOT', 'images') - - written = 0 - for entry in DATASETS: - bench_path, rel_path = render_dataset(entry, images_dir) - for path in (bench_path, rel_path): - print(f"wrote {os.path.relpath(path, script_dir)}") - written += 1 - - print(f"\nDone: {written} images across {len(DATASETS)} platforms.") - - -if __name__ == '__main__': - main() diff --git a/doc/render_benchmarks.py b/doc/render_benchmarks.py new file mode 100644 index 00000000..4d9f8ce8 --- /dev/null +++ b/doc/render_benchmarks.py @@ -0,0 +1,634 @@ +#!/usr/bin/env python3 +# Copyright 2026 Matt Borland +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +"""Turn the committed benchmark data sets into the Boost.Int128 documentation. + +Reads every JSON data set under doc/modules/ROOT/data, as written by + + benchmark_u128 --json + benchmark_i128 --json + +and then + + * renders both plots for each platform into + doc/modules/ROOT/images/_graphs//_benchmarks.png and + doc/modules/ROOT/images/_graphs//_relative_performance.png, and + * regenerates the platform sections of + doc/modules/ROOT/pages/u128_benchmarks.adoc and i128_benchmarks.adoc, + replacing everything after the "// BENCHMARK-RESULTS-GENERATED" line. + +Refreshing the documentation is therefore: download the artifacts of the +benchmarks workflow, unpack the benchmarks-- folders into +doc/modules/ROOT/data, and run this script. Which platform, compiler, and +element count a data set describes is read out of the data set itself, so no +number, label, or file name is ever transcribed by hand. + + render_benchmarks.py # rewrite the pages and the plots + render_benchmarks.py --check # fail if the pages are out of date + render_benchmarks.py --compare # report against the published numbers +""" + +import argparse +import json +import os +import sys + +# Rows of the published tables and the x-axis of every chart, in order: +# (data set key, documentation label). +OPERATIONS = [ + ('comparisons', 'Comparisons'), + ('add', 'Addition'), + ('sub', 'Subtraction'), + ('mul', 'Multiplication'), + ('div', 'Division'), + ('mod', 'Modulo'), +] + +# The published numbers come from the random width operands (each element is 32, +# 64, 96, or 128 bits wide), which is the most representative mix. The data sets +# also carry the fixed width groups, the narrow divisions, the shifts, and the +# bitwise operations for anyone digging into a specific result. +GROUP = 'random_width' + +# Marks the start of the generated region of a page. Everything up to and +# including this line is preserved; everything after it is rewritten. +SENTINEL = '// BENCHMARK-RESULTS-GENERATED' + +# The two pages, keyed by the "sign" field of a data set. +PAGES = { + 'u128': 'u128_benchmarks.adoc', + 'i128': 'i128_benchmarks.adoc', +} + +# Section order and headings. The operating system anchors are linked from +# nav.adoc, so they have to keep their current spelling. +OS_ORDER = ['linux', 'windows', 'macos', 'freebsd', 'cygwin'] +OS_TITLES = {'linux': 'Linux', 'windows': 'Windows', 'macos': 'macOS', 'freebsd': 'FreeBSD', 'cygwin': 'Cygwin'} +OS_ANCHORS = {'macos': 'mac'} + +ARCH_ORDER = ['x64', 'ARM64', 's390x', 'ppc64le', 'ppc64', 'x86', 'x32', 'ARM32', 'riscv64', 'riscv32', 'loongarch64'] +ARCH_HEADINGS = {'x64': 'x86_64', 'x86': 'x86_32', 's390x': 'S390x', 'ppc64le': 'PPC64LE', 'ppc64': 'PPC64', 'x32': 'x32'} + +# __cplusplus (or _MSVC_LANG) to the year in the standard's name. +CXXSTD_LABELS = {201103: '11', 201402: '14', 201703: '17', 202002: '20', 202302: '23', 202612: '26'} + +# Bar colors by speed rank within an operation: green best, yellow second, red rest. +RANK_COLORS = {1: '#90EE90', 2: '#FFFFE0'} +SLOW_COLOR = '#FFB6C1' + +# How much slower a run has to be before --compare calls it out. The runners are +# shared, so anything tighter than this is noise. +REGRESSION_THRESHOLD = 5.0 + +# Fallback when a data set names a baseline that it did not measure; first match wins. +BASELINE_PRIORITY = { + 'u128': ['unsigned __int128', 'std::_Unsigned128', 'boost::mp::uint128_t'], + 'i128': ['__int128', 'std::_Signed128', 'boost::mp::int128_t'], +} + + +class data_set: + """One platform's measurements for one of the two types.""" + + def __init__(self, doc, path): + self.path = path + self.sign = doc['sign'] + self.type = doc.get('type', doc['sign']) + self.os = doc['os'] + self.arch = doc['arch'] + self.compiler = doc.get('compiler', '') + self.cxxstd = doc.get('cxxstd') + self.elements = doc.get('elements') + self.repetitions = doc.get('repetitions') + self.timings = {} + + for entry in doc.get('results', []): + key = (entry['group'], entry['operation'], entry['implementation']) + self.timings[key] = entry['microseconds'] + + measured = doc.get('implementations') or first_seen(doc.get('results', [])) + self.implementations = [name for name in measured if self.complete(name)] + + dropped = [name for name in measured if name not in self.implementations] + for name in dropped: + print(f"warning: {path}: no {GROUP} timings for '{name}', leaving it out") + + self.baseline = self.pick_baseline(doc.get('baseline', '')) + + # True when the implementation has a timing for every published row. + def complete(self, name): + return all((GROUP, op, name) in self.timings for op, _ in OPERATIONS) + + def pick_baseline(self, named): + if named in self.implementations: + return named + + for candidate in BASELINE_PRIORITY.get(self.sign, []): + if candidate in self.implementations: + return candidate + + # An empty data set is reported by the caller, which owns the file name. + return self.implementations[0] if self.implementations else '' + + def value(self, operation, implementation): + return self.timings[(GROUP, operation, implementation)] + + def row(self, implementation): + return [self.value(op, implementation) for op, _ in OPERATIONS] + + # 'GCC 16.0 - x64', the heading of both charts. + def title(self): + return f'{self.compiler} - {self.arch}' if self.compiler else self.arch + + def key(self): + os_rank = OS_ORDER.index(self.os) if self.os in OS_ORDER else len(OS_ORDER) + arch_rank = ARCH_ORDER.index(self.arch) if self.arch in ARCH_ORDER else len(ARCH_ORDER) + return (os_rank, self.os, arch_rank, self.arch) + + +# Implementation names in the order they were first measured. +def first_seen(results): + order = [] + for entry in results: + if entry['implementation'] not in order: + order.append(entry['implementation']) + return order + + +def load_data_sets(data_dir, require_both=True): + if not os.path.isdir(data_dir): + sys.exit(f'error: no data directory {data_dir}') + + by_sign = {sign: {} for sign in PAGES} + for root, _, files in os.walk(data_dir): + for name in sorted(files): + if not name.endswith('.json'): + continue + + path = os.path.join(root, name) + with open(path) as handle: + doc = json.load(handle) + + if doc.get('sign') not in by_sign: + sys.exit(f"error: {path}: unknown sign '{doc.get('sign')}'") + + entry = data_set(doc, path) + if not entry.implementations: + sys.exit(f'error: {path}: no usable timings') + + platform = (entry.os, entry.arch) + existing = by_sign[entry.sign].get(platform) + if existing is not None: + sys.exit(f'error: {path} and {existing.path} both describe {entry.sign} on {entry.os}/{entry.arch}') + + by_sign[entry.sign][platform] = entry + + if require_both: + for sign, found in by_sign.items(): + if not found: + sys.exit(f'error: no {sign} data sets under {data_dir}') + elif not any(by_sign.values()): + sys.exit(f'error: no data sets under {data_dir}') + + return {sign: sorted(found.values(), key=data_set.key) for sign, found in by_sign.items()} + + +# ------------------------------- documentation ------------------------------- + +def heading(entry): + text = ARCH_HEADINGS.get(entry.arch, entry.arch) + if entry.os == 'macos' and entry.arch == 'ARM64': + text += ' (Apple Silicon)' + return text + + +def measurement_note(entry): + parts = [] + if entry.compiler: + standard = CXXSTD_LABELS.get(entry.cxxstd) + suffix = f' (pass:[C++]{standard})' if standard else '' + parts.append(f'Measured with {entry.compiler}{suffix}') + + if entry.elements and entry.repetitions: + total = entry.elements * entry.repetitions + passes = 'pass' if entry.repetitions == 1 else 'passes' + parts.append(f'{entry.repetitions} {passes} over {entry.elements:,} element pairs ' + f'({total:,} operations per cell)') + + return ': '.join(parts) + '.' if parts else '' + + +def render_page(sign, platforms): + lines = [] + current_os = None + + for entry in platforms: + if entry.os != current_os: + current_os = entry.os + anchor = OS_ANCHORS.get(current_os, current_os) + lines.append(f'[#{sign}_{anchor}]') + lines.append(f'== {OS_TITLES.get(current_os, current_os)}') + lines.append('') + + lines.append(f'=== {heading(entry)}') + lines.append('') + + if entry.baseline.startswith('boost::mp::'): + lines.append(f'NOTE: This platform has no hardware type so we compare relative to `{entry.baseline}`') + lines.append('') + + note = measurement_note(entry) + if note: + lines.append(note) + lines.append('') + + lines.append('[cols="1' + ',>1' * len(entry.implementations) + '"]') + lines.append('|===') + lines.append('| Operation | ' + ' | '.join(f'`{name}`' for name in entry.implementations)) + lines.append('') + + for op, label in OPERATIONS: + cells = ' | '.join(f'{entry.value(op, name):,}' for name in entry.implementations) + lines.append(f'| {label} | {cells}') + + lines.append('|===') + lines.append('') + lines.append(f'image::{sign}_graphs/{entry.os}/{entry.arch}_relative_performance.png' + f'[{entry.arch} Relative Performance, width=100%]') + lines.append('') + + return '\n'.join(lines).rstrip() + '\n' + + +def update_page(path, body, check): + with open(path) as handle: + original = handle.read() + + marker = original.find(SENTINEL) + if marker < 0: + sys.exit(f"error: sentinel '{SENTINEL}' not found in {path}") + + head = original[:marker + len(SENTINEL)] + updated = head + '\n\n' + body + + if check: + return updated == original + + with open(path, 'w') as handle: + handle.write(updated) + + return True + + +# --------------------------------- comparison --------------------------------- + +# Nanoseconds per element pair, so that data sets measured with different element +# counts remain comparable. The comparison row covers six operators, so it is +# roughly six times an arithmetic row either side. +def ns_per_op(entry, operation, implementation): + total = entry.elements * entry.repetitions + return entry.value(operation, implementation) * 1000.0 / total + + +def change_percent(before, after): + return (after - before) / before * 100.0 + + +# Cost of the library type as a multiple of the platform's reference type. Both +# are measured in the same process on the same machine, so this ratio survives a +# comparison between runs on different hardware, which the raw times do not. +def ratio_to_reference(entry, operation, reference): + return ns_per_op(entry, operation, entry.type) / ns_per_op(entry, operation, reference) + + +# How much faster the machine itself got, taken from the reference type. Anything +# far from 1.0 means the two runs are not on comparable hardware or toolchains. +def machine_scale(before, after, reference): + factors = [ns_per_op(before, op, reference) / ns_per_op(after, op, reference) + for op, _ in OPERATIONS] + return sum(factors) / len(factors) + + +def comparable(entry, implementation): + return implementation in entry.implementations and entry.elements and entry.repetitions + + +# One markdown section per platform. The ratio columns carry the verdict; the +# absolute times are there because they are what gets published. +def render_comparison(published, measured): + lines = ['## Benchmark comparison', '', + 'Published numbers are the ones committed under `doc/modules/ROOT/data`.', + 'Absolute times are nanoseconds per element pair. The verdict comes from the', + 'ratio against the reference type, which is measured in the same process and so', + 'cancels out the machine the run happened on.', ''] + + for sign, platforms in sorted(measured.items()): + by_platform = {(entry.os, entry.arch): entry for entry in published.get(sign, [])} + + for entry in platforms: + before = by_platform.get((entry.os, entry.arch)) + lines.append(f'### `{entry.type}` on {entry.os}/{entry.arch}') + lines.append('') + + if before is None: + lines.append(f'Nothing published for {entry.os}/{entry.arch} yet, so there is nothing to ' + f'compare against. Publish this run to create the baseline.') + lines.append('') + continue + + if not (comparable(before, entry.type) and comparable(entry, entry.type)): + lines.append(f'One of the two data sets has no usable `{entry.type}` timings.') + lines.append('') + continue + + reference = entry.baseline + paired = (reference != entry.type + and comparable(before, reference) and comparable(entry, reference)) + + if paired: + scale = machine_scale(before, entry, reference) + lines.append(f'Reference type: `{reference}`. This run is {scale:.2f}x the published ' + f'speed on it, so read the ratio columns, not the absolute ones, whenever ' + f'that number is far from 1.') + else: + lines.append(f'No `{reference}` timings on both sides, so only the absolute times can be ' + f'compared here. They are only meaningful if both runs are on the same machine.') + + if before.compiler != entry.compiler or before.elements != entry.elements: + lines.append('') + lines.append(f'Published with {before.compiler or "an unknown compiler"} over ' + f'{before.elements:,} elements, this run with {entry.compiler} over ' + f'{entry.elements:,}.') + + lines.append('') + lines.append('| Operation | published vs ref | this run vs ref | change | published ns | this run ns | |') + lines.append('|---|---:|---:|---:|---:|---:|---|') + + for op, label in OPERATIONS: + was = ns_per_op(before, op, entry.type) + now = ns_per_op(entry, op, entry.type) + + if paired: + was_ratio = ratio_to_reference(before, op, reference) + now_ratio = ratio_to_reference(entry, op, reference) + delta = change_percent(was_ratio, now_ratio) + ratios = f'{was_ratio:.2f}x | {now_ratio:.2f}x' + else: + delta = change_percent(was, now) + ratios = 'n/a | n/a' + + flag = 'REGRESSION' if delta > REGRESSION_THRESHOLD else '' + lines.append(f'| {label} | {ratios} | {delta:+.1f}% | {was:.2f} | {now:.2f} | {flag} |') + + lines.append('') + + return '\n'.join(lines) + '\n' + + +# ----------------------------------- plots ----------------------------------- + +# Imported on demand, and always headless: --check then needs no plotting stack. +def pyplot(): + import matplotlib + matplotlib.use('Agg') + import matplotlib.pyplot as plt + return plt + + +# 1-based speed rank per implementation for one operation row (1 == fastest). +def speed_ranks(values): + import numpy as np + + return np.argsort(np.argsort(values)) + 1 + + +def color_for_rank(rank): + return RANK_COLORS.get(rank, SLOW_COLOR) + + +# Offsets that center a group of bars on its tick. +def offsets(count, width): + return [(index - (count - 1) / 2.0) * width for index in range(count)] + + +def swatches(colors): + from matplotlib.patches import Patch + + return [Patch(facecolor=color, edgecolor='black', linewidth=0.5) for color in colors] + + +# Draws a legend showing the labels exactly as given. matplotlib drops any label +# that starts with an underscore, which would silently hide '__int128', so the +# legend is built with placeholders and the text is filled in afterwards; the box +# is laid out when the figure is drawn, so it still fits the real labels. +def legend(ax, handles, labels, **kwargs): + drawn = ax.legend(handles, [str(index) for index in range(len(labels))], **kwargs) + for text, label in zip(drawn.get_texts(), labels): + text.set_text(label) + + return drawn + + +# Absolute timings: the same bars on a linear and on a logarithmic axis. +def save_benchmark_chart(entry, path): + import numpy as np + + plt = pyplot() + impls = entry.implementations + labels = [label for _, label in OPERATIONS] + rows = [[entry.value(op, name) for name in impls] for op, _ in OPERATIONS] + ranks = [speed_ranks(row) for row in rows] + + x = np.arange(len(labels)) + width = min(0.25, 0.8 / len(impls)) + shift = offsets(len(impls), width) + + fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 10)) + + for op_index, row in enumerate(rows): + for impl_index in range(len(impls)): + ax1.bar(x[op_index] + shift[impl_index], row[impl_index], width, + color=color_for_rank(ranks[op_index][impl_index]), edgecolor='black', linewidth=0.5) + ax1.text(x[op_index] + shift[impl_index], row[impl_index], f'{row[impl_index]:,}', + ha='center', va='bottom', fontsize=8, rotation=90) + + # The bars are colored by rank, so the legend keys the implementations by + # their position within a group, using the first row's colors. + colors = [color_for_rank(rank) for rank in ranks[0]] + + ax1.set_xlabel('Operations', fontsize=12) + ax1.set_ylabel('Time (microseconds)', fontsize=12) + ax1.set_title(f'{entry.title()} Benchmark Results', fontsize=14, fontweight='bold') + ax1.set_xticks(x) + ax1.set_xticklabels(labels, rotation=45, ha='right') + legend(ax1, swatches(colors), impls, loc='upper left', title='In bar order; green is fastest') + ax1.grid(axis='y', alpha=0.3) + + for impl_index in range(len(impls)): + bars = ax2.bar(x + shift[impl_index], [row[impl_index] for row in rows], width, + edgecolor='black', linewidth=0.5) + for op_index, bar in enumerate(bars): + bar.set_facecolor(color_for_rank(ranks[op_index][impl_index])) + + legend(ax2, swatches(colors), impls, loc='upper left', title='In bar order; green is fastest') + ax2.set_xlabel('Operations', fontsize=12) + ax2.set_ylabel('Time (microseconds) - Log Scale', fontsize=12) + ax2.set_title(f'{entry.title()} Benchmark Results (Log Scale)', fontsize=14, fontweight='bold') + ax2.set_yscale('log') + ax2.set_xticks(x) + ax2.set_xticklabels(labels, rotation=45, ha='right') + ax2.grid(axis='y', alpha=0.3, which='both') + + fig.tight_layout() + fig.savefig(path, dpi=300, bbox_inches='tight') + plt.close(fig) + + +# Every implementation normalized to the platform's reference type. +def save_relative_chart(entry, path): + import numpy as np + + plt = pyplot() + impls = [name for name in entry.implementations if name != entry.baseline] + if not impls: + return False + + labels = [label for _, label in OPERATIONS] + base = entry.row(entry.baseline) + normalized = {name: [value / reference for value, reference in zip(entry.row(name), base)] for name in impls} + + x = np.arange(len(labels)) + width = min(0.25, 0.8 / len(impls)) + shift = offsets(len(impls), width) + + fig, ax = plt.subplots(figsize=(10, 6)) + handles = [] + + for impl_index, name in enumerate(impls): + bars = ax.bar(x + shift[impl_index], normalized[name], width, + edgecolor='black', linewidth=0.5) + handles.append(bars) + for bar in bars: + height = bar.get_height() + ax.text(bar.get_x() + bar.get_width() / 2.0, height, + f'{height:.2f}x', ha='center', va='bottom', fontsize=9) + + # Headroom above the tallest bar so its value label and the "lower is better" + # note in the top-left corner never collide with the bars. + tallest = max(max(values) for values in normalized.values()) + ax.set_ylim(top=max(tallest * 1.20, 1.12)) + + reference = ax.axhline(y=1.0, color='red', linestyle='--', alpha=0.5) + ax.set_xlabel('Operations', fontsize=12) + ax.set_ylabel(f'Relative Performance (vs {entry.baseline})', fontsize=12) + ax.set_title(f'Relative Performance Comparison - {entry.title()}', fontsize=14, fontweight='bold') + ax.set_xticks(x) + ax.set_xticklabels(labels, rotation=45, ha='right') + legend(ax, [reference] + handles, [f'{entry.baseline} baseline'] + impls) + ax.grid(axis='y', alpha=0.3) + ax.text(0.02, 0.98, 'Lower is better', transform=ax.transAxes, + fontsize=10, verticalalignment='top', style='italic') + + fig.tight_layout() + fig.savefig(path, dpi=300, bbox_inches='tight') + plt.close(fig) + return True + + +def render_plots(sign, platforms, images_dir): + written = [] + for entry in platforms: + out_dir = os.path.join(images_dir, f'{sign}_graphs', entry.os) + os.makedirs(out_dir, exist_ok=True) + + absolute = os.path.join(out_dir, f'{entry.arch}_benchmarks.png') + relative = os.path.join(out_dir, f'{entry.arch}_relative_performance.png') + + save_benchmark_chart(entry, absolute) + written.append(absolute) + + if save_relative_chart(entry, relative): + written.append(relative) + else: + print(f'warning: {entry.path}: only the baseline was measured, no relative chart') + + return written + + +# Plots left over from a data set that is no longer present. +def report_stale_plots(images_dir, written): + expected = {os.path.abspath(path) for path in written} + for root, _, files in os.walk(images_dir): + for name in sorted(files): + if not name.endswith('.png'): + continue + + path = os.path.abspath(os.path.join(root, name)) + if path not in expected and '_graphs' in root: + print(f'warning: {os.path.relpath(path, images_dir)} has no data set behind it') + + +def main(): + here = os.path.dirname(os.path.abspath(__file__)) + parser = argparse.ArgumentParser() + parser.add_argument('--data', default=os.path.join(here, 'modules', 'ROOT', 'data'), + help='directory holding the benchmarks-- folders') + parser.add_argument('--images', default=os.path.join(here, 'modules', 'ROOT', 'images'), + help='documentation images tree') + parser.add_argument('--pages', default=os.path.join(here, 'modules', 'ROOT', 'pages'), + help='documentation pages tree') + parser.add_argument('--check', action='store_true', + help='write nothing; exit 1 if a page is not what the data sets say it should be') + parser.add_argument('--compare', + help='directory of fresh data sets to report against the published ones') + parser.add_argument('--summary', + help='file to append the comparison to, e.g. $GITHUB_STEP_SUMMARY (default stdout)') + args = parser.parse_args() + + if args.compare: + report = render_comparison(load_data_sets(args.data), + load_data_sets(args.compare, require_both=False)) + if args.summary: + with open(args.summary, 'a') as handle: + handle.write(report) + + sys.stdout.write(report) + return 0 + + data_sets = load_data_sets(args.data) + stale = [] + written = [] + + for sign, platforms in sorted(data_sets.items()): + page = os.path.join(args.pages, PAGES[sign]) + up_to_date = update_page(page, render_page(sign, platforms), args.check) + + if args.check: + if not up_to_date: + stale.append(page) + continue + + plots = render_plots(sign, platforms, args.images) + written.extend(plots) + print(f'{PAGES[sign]}: {len(platforms)} platform(s), {len(plots)} plot(s)') + for entry in platforms: + print(f' - {entry.os}/{entry.arch}: {entry.title()}, baseline {entry.baseline}') + + if args.check: + for page in stale: + print(f'{page} is out of date; re-run render_benchmarks.py') + + if stale: + return 1 + + print('the pages match the committed data sets') + return 0 + + report_stale_plots(args.images, written) + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/examples/construction.cpp b/examples/construction.cpp index 1ddfe4dc..fc92ec1b 100644 --- a/examples/construction.cpp +++ b/examples/construction.cpp @@ -54,7 +54,8 @@ int main() constexpr int128_t signed_builtin {-42}; std::cout << "From builtin (-42): " << signed_builtin << std::endl; - // Signed from parts (high is signed, low is unsigned) + // Signed from parts. Both words are stored unsigned, but the constructor takes + // the high word signed; read it back with signed_high(). constexpr int128_t min_value {INT64_MIN, 0}; std::cout << "From parts (INT64_MIN, 0): " << min_value << std::endl; std::cout << " Equals numeric_limits min? " diff --git a/extra/int128.natvis b/extra/int128.natvis index c08126d8..9d3ecbae 100644 --- a/extra/int128.natvis +++ b/extra/int128.natvis @@ -25,11 +25,13 @@ - + {low,u} - -{~low + 1,u} - 0x{((unsigned long long)(high)),nvohb}{low,nvohb} + -{~low + 1,u} + 0x{high,nvohb}{low,nvohb} high low diff --git a/extra/int128_printer_gdb.py b/extra/int128_printer_gdb.py index 360990a9..49b5e923 100644 --- a/extra/int128_printer_gdb.py +++ b/extra/int128_printer_gdb.py @@ -4,9 +4,10 @@ # # Struct definitions: # struct uint128_t { std::uint64_t low; std::uint64_t high; }; -# struct int128_t { std::uint64_t low; std::int64_t high; }; +# struct int128_t { std::uint64_t low; std::uint64_t high; }; # -# On big endian machines the word order is reversed +# Both words of both types are unsigned; int128_t reads the pair as two's +# complement. On big endian machines the word order is reversed. # # Usage: source int128_printer.py @@ -46,9 +47,8 @@ def __init__(self, val): def to_string(self): try: - # high is std::int64_t (signed) - high = int(self.val["high"]) - # Ensure high is treated as signed 64-bit + # high is std::uint64_t; fold the two's complement sign in by hand + high = int(self.val["high"]) & 0xFFFFFFFFFFFFFFFF if high >= 0x8000000000000000: high -= 0x10000000000000000 diff --git a/extra/int128_printer_lldb.py b/extra/int128_printer_lldb.py index 40954e84..a3f9a824 100644 --- a/extra/int128_printer_lldb.py +++ b/extra/int128_printer_lldb.py @@ -4,9 +4,10 @@ # # Struct definitions: # struct uint128_t { std::uint64_t low; std::uint64_t high; }; -# struct int128_t { std::uint64_t low; std::int64_t high; }; +# struct int128_t { std::uint64_t low; std::uint64_t high; }; # -# On big endian machines the word order is reversed +# Both words of both types are unsigned; int128_t reads the pair as two's +# complement. On big endian machines the word order is reversed. import lldb @@ -32,12 +33,15 @@ def int128_summary(valobj, internal_dict): """ try: val = valobj.GetNonSyntheticValue() - # high is std::int64_t, so use GetValueAsSigned() - high = val.GetChildMemberWithName("high").GetValueAsSigned() - # low is std::uint64_t, so use GetValueAsUnsigned() + # Both words are std::uint64_t, so read them unsigned and fold the + # two's complement sign in by hand. + high = val.GetChildMemberWithName("high").GetValueAsUnsigned() low = val.GetChildMemberWithName("low").GetValueAsUnsigned() - value = (high << 64) + low + value = (high << 64) | low + if value >= (1 << 127): + value -= (1 << 128) + return f"{value:,}" except Exception as e: return f"" diff --git a/include/boost/int128/cstdlib.hpp b/include/boost/int128/cstdlib.hpp index b90eda39..658685ba 100644 --- a/include/boost/int128/cstdlib.hpp +++ b/include/boost/int128/cstdlib.hpp @@ -69,8 +69,8 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr i128div_t div(const int12 return {0, x}; } - const auto negative_quot {(x.high < 0) != (y.high < 0)}; - const auto negative_rem {x.high < 0}; + const auto negative_quot {(x.signed_high() < 0) != (y.signed_high() < 0)}; + const auto negative_rem {x.signed_high() < 0}; #if defined(BOOST_INT128_HAS_INT128) diff --git a/include/boost/int128/detail/common_div.hpp b/include/boost/int128/detail/common_div.hpp index 0237ead5..18e87f83 100644 --- a/include/boost/int128/detail/common_div.hpp +++ b/include/boost/int128/detail/common_div.hpp @@ -496,12 +496,10 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr std::size_t to_word template BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr T from_words(const std::uint32_t (&words)[4]) noexcept { - using high_word_type = decltype(T{}.high); - const auto low {static_cast(words[0]) | (static_cast(words[1]) << 32)}; const auto high {static_cast(words[2]) | (static_cast(words[3]) << 32)}; - return {static_cast(high), low}; + return {static_cast>(high), low}; } } // namespace impl @@ -568,15 +566,13 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr T knuth_div(const T { BOOST_INT128_ASSUME(divisor != static_cast(0)); - using high_word_type = decltype(T{}.high); - std::uint64_t rem_hi {}; std::uint64_t rem_lo {}; const auto q {div3by2(static_cast(dividend.high), dividend.low, static_cast(divisor.high), divisor.low, rem_hi, rem_lo)}; - return T{static_cast(0), q}; + return T{static_cast>(0), q}; } template @@ -584,17 +580,15 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr T knuth_div(const T { BOOST_INT128_ASSUME(divisor != static_cast(0)); - using high_word_type = decltype(T{}.high); - std::uint64_t rem_hi {}; std::uint64_t rem_lo {}; const auto q {div3by2(static_cast(dividend.high), dividend.low, static_cast(divisor.high), divisor.low, rem_hi, rem_lo)}; - remainder = T{static_cast(rem_hi), rem_lo}; + remainder = T{static_cast>(rem_hi), rem_lo}; - return T{static_cast(0), q}; + return T{static_cast>(0), q}; } #ifdef _MSC_VER diff --git a/include/boost/int128/detail/common_mul.hpp b/include/boost/int128/detail/common_mul.hpp index d4848929..a4bf0fa6 100644 --- a/include/boost/int128/detail/common_mul.hpp +++ b/include/boost/int128/detail/common_mul.hpp @@ -6,6 +6,7 @@ #define BOOST_INT128_DETAIL_COMMON_MUL_HPP #include +#include #ifndef BOOST_INT128_BUILD_MODULE @@ -17,6 +18,21 @@ namespace boost { namespace int128 { namespace detail { +template +struct ctor_high_word +{ + using type = std::uint64_t; +}; + +template <> +struct ctor_high_word +{ + using type = std::int64_t; +}; + +template +using ctor_high_word_t = typename ctor_high_word::type; + // High 64 bits of the 64x64 -> 128 product, computed with four 32-bit partial products BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr std::uint64_t umulh_generic(const std::uint64_t a, const std::uint64_t b) noexcept { @@ -70,29 +86,25 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr std::uint64_t umul( template BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr ReturnType low_word_mul(const T& lhs, const T& rhs) noexcept { - using high_word_type = decltype(ReturnType{}.high); - std::uint64_t result_high {}; const std::uint64_t result_low {umul(lhs.low, rhs.low, result_high)}; result_high += lhs.low * static_cast(rhs.high); result_high += static_cast(lhs.high) * rhs.low; - return ReturnType{static_cast(result_high), result_low}; + return ReturnType{static_cast>(result_high), result_low}; } // Low 128 bits of a 128x64 product template BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr ReturnType low_word_mul(const T& lhs, const std::uint64_t rhs) noexcept { - using high_word_type = decltype(ReturnType{}.high); - std::uint64_t result_high {}; const std::uint64_t result_low {umul(lhs.low, rhs, result_high)}; result_high += static_cast(lhs.high) * rhs; - return ReturnType{static_cast(result_high), result_low}; + return ReturnType{static_cast>(result_high), result_low}; } // Low 128 bits of a 128x32 product diff --git a/include/boost/int128/detail/conversions.hpp b/include/boost/int128/detail/conversions.hpp index aca90214..ed8dba24 100644 --- a/include/boost/int128/detail/conversions.hpp +++ b/include/boost/int128/detail/conversions.hpp @@ -26,15 +26,15 @@ BOOST_INT128_INLINE_CONSTEXPR bool is_valid_overload_v = valid_overload::valu #if BOOST_INT128_ENDIAN_LITTLE_BYTE -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : low {v.low}, high {static_cast(v.high)} {} +BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : low {v.low}, high {v.high} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : low {v.low}, high {static_cast(v.high)} {} +BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : low {v.low}, high {v.high} {} #else -BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : high {static_cast(v.high)}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(const uint128_t& v) noexcept : high {v.high}, low {v.low} {} -BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : high {static_cast(v.high)}, low {v.low} {} +BOOST_INT128_HOST_DEVICE constexpr uint128_t::uint128_t(const int128_t& v) noexcept : high {v.high}, low {v.low} {} #endif // BOOST_INT128_ENDIAN_LITTLE_BYTE diff --git a/include/boost/int128/detail/int128_imp.hpp b/include/boost/int128/detail/int128_imp.hpp index b10af4e6..0341f15a 100644 --- a/include/boost/int128/detail/int128_imp.hpp +++ b/include/boost/int128/detail/int128_imp.hpp @@ -32,7 +32,7 @@ int128_t { #if BOOST_INT128_ENDIAN_LITTLE_BYTE std::uint64_t low {}; - std::int64_t high {}; + std::uint64_t high {}; #else #ifdef __GNUC__ @@ -40,7 +40,7 @@ int128_t # pragma GCC diagnostic ignored "-Wreorder" #endif - std::int64_t high {}; + std::uint64_t high {}; std::uint64_t low {}; #ifdef __GNUC__ @@ -62,35 +62,35 @@ int128_t // Construct from integral types #if BOOST_INT128_ENDIAN_LITTLE_BYTE - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{hi} {} + BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : low{lo}, high{static_cast(hi)} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? -1 : 0} {} + BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : low {static_cast(v)}, high {v < 0 ? ~UINT64_C(0) : UINT64_C(0)} {} template BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : low {static_cast(v)}, high {} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : low {static_cast(v & static_cast(detail::low_word_mask))}, high {static_cast(v >> static_cast(64U))} {} #endif // BOOST_INT128_HAS_INT128 #else // Big endian - BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : high{hi}, low{lo} {} + BOOST_INT128_HOST_DEVICE constexpr int128_t(const std::int64_t hi, const std::uint64_t lo) noexcept : high{static_cast(hi)}, low{lo} {} template - BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : high{v < 0 ? -1 : 0}, low{static_cast(v)} {} + BOOST_INT128_HOST_DEVICE constexpr int128_t(const SignedInteger v) noexcept : high{v < 0 ? ~UINT64_C(0) : UINT64_C(0)}, low{static_cast(v)} {} template BOOST_INT128_HOST_DEVICE constexpr int128_t(const UnsignedInteger v) noexcept : high {}, low {static_cast(v)} {} #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} - BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_i128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} + BOOST_INT128_HOST_DEVICE BOOST_INT128_BUILTIN_CONSTEXPR int128_t(const detail::builtin_u128 v) noexcept : high {static_cast(v >> 64U)}, low {static_cast(v & detail::low_word_mask)} {} #endif // BOOST_INT128_HAS_INT128 @@ -100,6 +100,11 @@ int128_t template BOOST_INT128_HOST_DEVICE constexpr int128_t(Float f) noexcept; + // The high word read as a signed value. + // Every operation whose meaning depends on the sign of the value goes through + // this rather than reading high directly. + BOOST_INT128_HOST_DEVICE constexpr std::int64_t signed_high() const noexcept { return static_cast(high); } + // Integer Conversion operators BOOST_INT128_HOST_DEVICE explicit constexpr operator bool() const noexcept { return low || high; } @@ -268,16 +273,30 @@ int128_t #endif // BOOST_INT128_HAS_MSVC_INT128 }; +namespace detail { + +// Builds an int128_t from the raw two's complement words +// Enables vectorization +BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t from_bits(const std::uint64_t hi, const std::uint64_t lo) noexcept +{ + int128_t result {}; + result.high = hi; + result.low = lo; + return result; +} + +} // namespace detail + //===================================== // Absolute Value function //===================================== BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t abs(int128_t value) noexcept { - if (value.high < 0) + if (value.signed_high() < 0) { value.low = ~value.low + 1U; - value.high = static_cast(~static_cast(value.high) + static_cast(value.low == 0 ? 1 : 0)); + value.high = ~value.high + static_cast(value.low == 0 ? 1 : 0); } return value; @@ -300,7 +319,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator float() const noexcept #else - return detail::signed_words_to_float(high, low); + return detail::signed_words_to_float(signed_high(), low); #endif } @@ -313,7 +332,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::operator double() const noexcept #else - return detail::signed_words_to_float(high, low); + return detail::signed_words_to_float(signed_high(), low); #endif } @@ -328,7 +347,7 @@ constexpr int128_t::operator long double() const noexcept #else - return detail::signed_words_to_float(high, low); + return detail::signed_words_to_float(signed_high(), low); #endif } @@ -359,14 +378,14 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept if (f >= two_127) { - high = (std::numeric_limits::max)(); + high = UINT64_C(0x7FFFFFFFFFFFFFFF); low = UINT64_MAX; return; } if (f <= -two_127) { - high = (std::numeric_limits::min)(); + high = UINT64_C(0x8000000000000000); low = UINT64_C(0); return; } @@ -387,7 +406,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t::int128_t(Float f) noexcept h = ~h + (low_was_zero ? UINT64_C(1) : UINT64_C(0)); } - high = static_cast(h); + high = h; low = l; } @@ -402,8 +421,10 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator+(const BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator-(const int128_t value) noexcept { - return (value.low == 0) ? int128_t{static_cast(0ULL - static_cast(value.high)), 0} : - int128_t{~value.high, ~value.low + 1}; + // Spelled with the constructor rather than from_bits: clang folds the low word + // of the low == 0 arm away here, and loses that if the members are written. + return (value.low == 0) ? int128_t{static_cast(UINT64_C(0) - value.high), 0} : + int128_t{static_cast(~value.high), ~value.low + 1}; } //===================================== @@ -448,13 +469,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator==(const int128_t lhs, const SignedInteger rhs) noexcept { - return lhs.high == (rhs < 0 ? -1 : 0) && lhs.low == static_cast(rhs); + return lhs.high == (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && lhs.low == static_cast(rhs); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator==(const SignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high == (lhs < 0 ? -1 : 0) && rhs.low == static_cast(lhs); + return rhs.high == (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) && rhs.low == static_cast(lhs); } BOOST_INT128_EXPORT template @@ -532,13 +553,13 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const boo BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const int128_t lhs, const SignedInteger rhs) noexcept { - return lhs.high != (rhs < 0 ? -1 : 0) || lhs.low != static_cast(rhs); + return lhs.high != (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || lhs.low != static_cast(rhs); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator!=(const SignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high != (lhs < 0 ? -1 : 0) || rhs.low != static_cast(lhs); + return rhs.high != (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)) || rhs.low != static_cast(lhs); } BOOST_INT128_EXPORT template @@ -582,7 +603,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int1 if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return lhs.high == rhs.high ? lhs.low < rhs.low : lhs.high < rhs.high; + return lhs.high == rhs.high ? lhs.low < rhs.low : lhs.signed_high() < rhs.signed_high(); } else { @@ -597,7 +618,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int1 #else - return lhs.high == rhs.high ? lhs.low < rhs.low : lhs.high < rhs.high; + return lhs.high == rhs.high ? lhs.low < rhs.low : lhs.signed_high() < rhs.signed_high(); #endif } @@ -605,24 +626,24 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int1 BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return lhs.high < 0 || (lhs.high == 0 && lhs.low < static_cast(rhs)); + return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low < static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high > 0 || (rhs.high == 0 && static_cast(lhs) < rhs.low); + return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) < rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const SignedInteger rhs) noexcept { - if (lhs.high < 0) + if (lhs.signed_high() < 0) { return rhs >= 0 ? true : lhs < static_cast(rhs); } - if (lhs.high > 0 || rhs < 0) + if (lhs.signed_high() > 0 || rhs < 0) { return false; } @@ -633,13 +654,13 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<(const int128_t lhs, const Sign BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<(const SignedInteger lhs, const int128_t rhs) noexcept { - if (rhs.high < 0) + if (rhs.signed_high() < 0) { return lhs >= 0 ? false : static_cast(lhs) < rhs; } // rhs is positive - if (rhs.high > 0 || lhs < 0) + if (rhs.signed_high() > 0 || lhs < 0) { return true; } @@ -676,7 +697,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int1 if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return lhs.high == rhs.high ? lhs.low > rhs.low : lhs.high > rhs.high; + return lhs.high == rhs.high ? lhs.low > rhs.low : lhs.signed_high() > rhs.signed_high(); } else { @@ -691,7 +712,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int1 #else - return lhs.high == rhs.high ? lhs.low > rhs.low : lhs.high > rhs.high; + return lhs.high == rhs.high ? lhs.low > rhs.low : lhs.signed_high() > rhs.signed_high(); #endif } @@ -711,13 +732,13 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator>(const SignedInteger lhs, const BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator>(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return lhs.high > 0 || (lhs.high == 0 && lhs.low > static_cast(rhs)); + return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low > static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator>(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high < 0 || (rhs.high == 0 && static_cast(lhs) > rhs.low); + return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) > rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -749,7 +770,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return lhs.high == rhs.high ? lhs.low <= rhs.low : lhs.high <= rhs.high; + return lhs.high == rhs.high ? lhs.low <= rhs.low : lhs.signed_high() <= rhs.signed_high(); } else { @@ -764,7 +785,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int #else - return lhs.high == rhs.high ? lhs.low <= rhs.low : lhs.high <= rhs.high; + return lhs.high == rhs.high ? lhs.low <= rhs.low : lhs.signed_high() <= rhs.signed_high(); #endif } @@ -784,13 +805,13 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const SignedInteger lhs, cons BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return lhs.high < 0 || (lhs.high == 0 && lhs.low <= static_cast(rhs)); + return lhs.signed_high() < 0 || (lhs.high == 0 && lhs.low <= static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator<=(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high > 0 || (rhs.high == 0 && static_cast(lhs) <= rhs.low); + return rhs.signed_high() > 0 || (rhs.high == 0 && static_cast(lhs) <= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -822,7 +843,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int if (BOOST_INT128_IS_CONSTANT_EVALUATED(lhs)) { - return lhs.high == rhs.high ? lhs.low >= rhs.low : lhs.high >= rhs.high; + return lhs.high == rhs.high ? lhs.low >= rhs.low : lhs.signed_high() >= rhs.signed_high(); } else { @@ -837,7 +858,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int #else - return lhs.high == rhs.high ? lhs.low >= rhs.low : lhs.high >= rhs.high; + return lhs.high == rhs.high ? lhs.low >= rhs.low : lhs.signed_high() >= rhs.signed_high(); #endif } @@ -857,13 +878,13 @@ BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const SignedInteger lhs, cons BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return lhs.high > 0 || (lhs.high == 0 && lhs.low >= static_cast(rhs)); + return lhs.signed_high() > 0 || (lhs.high == 0 && lhs.low >= static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr bool operator>=(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return rhs.high < 0 || (rhs.high == 0 && static_cast(lhs) >= rhs.low); + return rhs.signed_high() < 0 || (rhs.high == 0 && static_cast(lhs) >= rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -978,7 +999,7 @@ BOOST_INT128_HOST_DEVICE constexpr std::strong_ordering operator<=>(const Unsign BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const int128_t rhs) noexcept { - return {~rhs.high, ~rhs.low}; + return detail::from_bits(~rhs.high, ~rhs.low); } //===================================== @@ -987,31 +1008,31 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator~(const BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const int128_t rhs) noexcept { - return {lhs.high | rhs.high, lhs.low | rhs.low}; + return detail::from_bits(lhs.high | rhs.high, lhs.low | rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const SignedInteger rhs) noexcept { - return {lhs.high | (rhs < 0 ? -1 : 0), lhs.low | static_cast(rhs)}; + return detail::from_bits(lhs.high | (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const SignedInteger lhs, const int128_t rhs) noexcept { - return {rhs.high | (lhs < 0 ? -1 : 0), static_cast(lhs) | rhs.low}; + return detail::from_bits(rhs.high | (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) | rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return {lhs.high, lhs.low | static_cast(rhs)}; + return detail::from_bits(lhs.high, lhs.low | static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator|(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return {rhs.high, static_cast(lhs) | rhs.low}; + return detail::from_bits(rhs.high, static_cast(lhs) | rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -1063,19 +1084,19 @@ BOOST_INT128_HOST_DEVICE inline int128_t& int128_t::operator|=(const Integer rhs BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const int128_t rhs) noexcept { - return {lhs.high & rhs.high, lhs.low & rhs.low}; + return detail::from_bits(lhs.high & rhs.high, lhs.low & rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const int128_t lhs, const SignedInteger rhs) noexcept { - return {lhs.high & (rhs < 0 ? -1 : 0), lhs.low & static_cast(rhs)}; + return detail::from_bits(lhs.high & (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low & static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator&(const SignedInteger lhs, const int128_t rhs) noexcept { - return {rhs.high & (lhs < 0 ? -1 : 0), static_cast(lhs) & rhs.low}; + return detail::from_bits(rhs.high & (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) & rhs.low); } BOOST_INT128_EXPORT template @@ -1139,31 +1160,31 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t& int128_t::operator&=(const int128_t BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const int128_t rhs) noexcept { - return {lhs.high ^ rhs.high, lhs.low ^ rhs.low}; + return detail::from_bits(lhs.high ^ rhs.high, lhs.low ^ rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const SignedInteger rhs) noexcept { - return {lhs.high ^ (rhs < 0 ? -1 : 0), lhs.low ^ static_cast(rhs)}; + return detail::from_bits(lhs.high ^ (rhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const SignedInteger lhs, const int128_t rhs) noexcept { - return {rhs.high ^ (lhs < 0 ? -1 : 0), static_cast(lhs) ^ rhs.low}; + return detail::from_bits(rhs.high ^ (lhs < 0 ? ~UINT64_C(0) : UINT64_C(0)), static_cast(lhs) ^ rhs.low); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const int128_t lhs, const UnsignedInteger rhs) noexcept { - return {lhs.high, lhs.low ^ static_cast(rhs)}; + return detail::from_bits(lhs.high, lhs.low ^ static_cast(rhs)); } BOOST_INT128_EXPORT template BOOST_INT128_HOST_DEVICE constexpr int128_t operator^(const UnsignedInteger lhs, const int128_t rhs) noexcept { - return {rhs.high, static_cast(lhs) ^ rhs.low}; + return detail::from_bits(rhs.high, static_cast(lhs) ^ rhs.low); } #if defined(BOOST_INT128_HAS_INT128) || defined(BOOST_INT128_HAS_MSVC_INT128) @@ -1230,22 +1251,19 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_ls_impl(const int128_t lhs, if (rhs == 64) { - return {static_cast(lhs.low), 0}; + return detail::from_bits(lhs.low, 0); } if (rhs > 64) { - return {static_cast(lhs.low << (rhs - 64)), 0}; + return detail::from_bits(lhs.low << (rhs - 64), 0); } // For shifts < 64 - std::uint64_t high_part = (static_cast(lhs.high) << rhs) | + std::uint64_t high_part = (lhs.high << rhs) | (lhs.low >> (64 - rhs)); - return { - static_cast(high_part), - lhs.low << rhs - }; + return detail::from_bits(high_part, lhs.low << rhs); } template @@ -1286,12 +1304,12 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In if (rhs >= 64) { - return {static_cast(lhs.low << (rhs - 64)), 0}; + return detail::from_bits(lhs.low << (rhs - 64), 0); } else { int128_t res; - res.high = static_cast(__shiftleft128(lhs.low, static_cast(lhs.high), static_cast(rhs))); + res.high = __shiftleft128(lhs.low, lhs.high, static_cast(rhs)); res.low = lhs.low << rhs; return res; @@ -1305,22 +1323,19 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_ls_impl(const int128_t lhs, const In } if (rhs == 64) { - return {static_cast(lhs.low), 0}; + return detail::from_bits(lhs.low, 0); } if (rhs > 64) { - return {static_cast(lhs.low << (rhs - 64)), 0}; + return detail::from_bits(lhs.low << (rhs - 64), 0); } // For shifts < 64 - const auto high_part = (static_cast(lhs.high) << rhs) | + const auto high_part = (lhs.high << rhs) | (lhs.low >> (64 - rhs)); - return { - static_cast(high_part), - lhs.low << rhs - }; + return detail::from_bits(high_part, lhs.low << rhs); #endif } @@ -1437,18 +1452,16 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t default_rs_impl(const int128_t lhs, if (rhs >= 64) { - return {lhs.high < 0 ? -1 : 0, static_cast(lhs.high >> (rhs - 64))}; + return detail::from_bits(lhs.signed_high() < 0 ? ~UINT64_C(0) : UINT64_C(0), + static_cast(lhs.signed_high() >> (rhs - 64))); } // For shifts < 64 - const auto high_to_low {static_cast(lhs.high) << (64 - rhs)}; + const auto high_to_low {lhs.high << (64 - rhs)}; const auto low_shifted {lhs.low >> rhs}; const auto low_part {high_to_low | low_shifted}; - return { - lhs.high >> rhs, - low_part - }; + return detail::from_bits(static_cast(lhs.signed_high() >> rhs), low_part); } template @@ -1488,13 +1501,14 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In if (rhs >= 64) { - return {lhs.high < 0 ? -1 : 0, static_cast(lhs.high >> (rhs - 64))}; + return detail::from_bits(lhs.signed_high() < 0 ? ~UINT64_C(0) : UINT64_C(0), + static_cast(lhs.signed_high() >> (rhs - 64))); } else { int128_t res; - res.low = __shiftright128(lhs.low, static_cast(lhs.high), static_cast(rhs)); - res.high = lhs.high >> rhs; + res.low = __shiftright128(lhs.low, lhs.high, static_cast(rhs)); + res.high = static_cast(lhs.signed_high() >> rhs); return res; } @@ -1508,18 +1522,16 @@ BOOST_INT128_HOST_DEVICE int128_t intrinsic_rs_impl(const int128_t lhs, const In if (rhs >= 64) { - return {lhs.high < 0 ? -1 : 0, static_cast(lhs.high >> (rhs - 64))}; + return detail::from_bits(lhs.signed_high() < 0 ? ~UINT64_C(0) : UINT64_C(0), + static_cast(lhs.signed_high() >> (rhs - 64))); } // For shifts < 64 - const auto high_to_low {static_cast(lhs.high) << (64 - rhs)}; + const auto high_to_low {lhs.high << (64 - rhs)}; const auto low_shifted {lhs.low >> rhs}; const auto low_part {high_to_low | low_shifted}; - return { - lhs.high >> rhs, - low_part - }; + return detail::from_bits(static_cast(lhs.signed_high() >> rhs), low_part); #endif } @@ -1668,11 +1680,11 @@ namespace detail { BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_add(const int128_t lhs, const int128_t rhs) noexcept { const auto new_low {lhs.low + rhs.low}; - const auto new_high {static_cast(lhs.high) + - static_cast(rhs.high) + + const auto new_high {lhs.high + + rhs.high + static_cast(new_low < lhs.low)}; - return int128_t{static_cast(new_high), new_low}; + return detail::from_bits(new_high, new_low); } BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const int128_t rhs) noexcept @@ -1687,9 +1699,9 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad std::uint64_t result_low {}; std::uint64_t result_high {}; - result_high = static_cast(lhs.high) + static_cast(rhs.high) + __builtin_add_overflow(lhs.low, rhs.low, &result_low); + result_high = lhs.high + rhs.high + __builtin_add_overflow(lhs.low, rhs.low, &result_low); - return int128_t{static_cast(result_high), result_low}; + return detail::from_bits(result_high, result_low); #elif defined(_M_AMD64) && !defined(BOOST_INT128_NO_CONSTEVAL_DETECTION) @@ -1701,7 +1713,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_ad { int128_t result {}; const auto carry {BOOST_INT128_ADD_CARRY(0, lhs.low, rhs.low, &result.low)}; - BOOST_INT128_ADD_CARRY(carry, static_cast(lhs.high), static_cast(rhs.high), reinterpret_cast(&result.high)); + BOOST_INT128_ADD_CARRY(carry, lhs.high, rhs.high, &result.high); return result; } @@ -1717,17 +1729,17 @@ template BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_add(const int128_t lhs, const Integer rhs) noexcept { const auto new_low {lhs.low + rhs}; - const auto new_high {static_cast(lhs.high) + static_cast(new_low < lhs.low)}; + const auto new_high {lhs.high + static_cast(new_low < lhs.low)}; - return int128_t{static_cast(new_high), new_low}; + return detail::from_bits(new_high, new_low); } BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t library_sub(const int128_t lhs, const int128_t rhs) noexcept { const auto new_low {lhs.low - rhs.low}; - const auto new_high {static_cast(lhs.high) - static_cast(rhs.high) - static_cast(lhs.low < rhs.low)}; + const auto new_high {lhs.high - rhs.high - static_cast(lhs.low < rhs.low)}; - return int128_t{static_cast(new_high), new_low}; + return detail::from_bits(new_high, new_low); } BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const int128_t rhs) noexcept @@ -1736,9 +1748,9 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su // __builtin_sub_overflow is marked constexpr so we don't need if consteval handling std::uint64_t result_low {}; - const auto result_high {static_cast(lhs.high) - static_cast(rhs.high) - static_cast(__builtin_sub_overflow(lhs.low, rhs.low, &result_low))}; + const auto result_high {lhs.high - rhs.high - static_cast(__builtin_sub_overflow(lhs.low, rhs.low, &result_low))}; - return int128_t{static_cast(result_high), result_low}; + return detail::from_bits(result_high, result_low); #elif defined(__aarch64__) && !defined(__APPLE__) @@ -1755,7 +1767,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_su { int128_t result {}; const auto borrow {BOOST_INT128_SUB_BORROW(0, lhs.low, rhs.low, &result.low)}; - BOOST_INT128_SUB_BORROW(borrow, static_cast(lhs.high), static_cast(rhs.high), reinterpret_cast(&result.high)); + BOOST_INT128_SUB_BORROW(borrow, lhs.high, rhs.high, &result.high); return result; } @@ -1771,8 +1783,8 @@ template BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_sub(const int128_t lhs, const Integer rhs) noexcept { const auto new_low {lhs.low - rhs}; - const auto new_high {static_cast(lhs.high) - static_cast(new_low > lhs.low)}; - return int128_t{static_cast(new_high), new_low}; + const auto new_high {lhs.high - static_cast(new_low > lhs.low)}; + return detail::from_bits(new_high, new_low); } } @@ -1971,7 +1983,7 @@ BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE constexpr int128_t default_mu BOOST_INT128_HOST_DEVICE BOOST_INT128_FORCE_INLINE int128_t msvc_amd64_mul(const int128_t lhs, const int128_t rhs) noexcept { int128_t result {}; - result.low = _umul128(lhs.low, rhs.low, reinterpret_cast(&result.high)); + result.low = _umul128(lhs.low, rhs.low, &result.high); result.high += lhs.low * rhs.high; result.high += lhs.high * rhs.low; @@ -2157,7 +2169,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const return {0,0}; } - const auto negative_res {(lhs.high < 0) != (rhs.high < 0)}; + const auto negative_res {(lhs.signed_high() < 0) != (rhs.signed_high() < 0)}; // Narrow fast path: when the divisor magnitude fits in 64 bits, divide the magnitudes with // the hardware-accelerated one_word_div and reapply the sign. This reuses the abs values @@ -2217,7 +2229,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const UnsignedInteger lhs, BOOST_INT128_UNREACHABLE; } - if (rhs.high != 0 && rhs.high != -1) + if (rhs.high != 0 && rhs.high != ~UINT64_C(0)) { return {0,0}; } @@ -2254,7 +2266,7 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const int128_t lhs, const int128_t quotient {}; constexpr int128_t min_val {INT64_MIN, 0}; - const auto negative_res {static_cast((lhs.high < 0) ^ (rhs < 0))}; + const auto negative_res {static_cast((lhs.signed_high() < 0) ^ (rhs < 0))}; // Negate in the unsigned domain so INT64_MIN does not overflow (UBSAN) const auto abs_rhs {rhs < 0 ? -static_cast(rhs) : static_cast(rhs)}; const auto abs_lhs {abs(lhs)}; @@ -2278,13 +2290,13 @@ BOOST_INT128_HOST_DEVICE constexpr int128_t operator/(const SignedInteger lhs, c BOOST_INT128_UNREACHABLE; } - if (rhs.high != 0 && rhs.high != -1) + if (rhs.high != 0 && rhs.high != ~UINT64_C(0)) { return {0,0}; } else { - const auto negative_res {static_cast((rhs.high < 0) ^ (lhs < 0))}; + const auto negative_res {static_cast((rhs.signed_high() < 0) ^ (lhs < 0))}; const auto abs_rhs {abs(rhs)}; // rhs == -2^64 has |rhs| greater than any 64-bit lhs, so the quotient is 0 (also avoids /0) if (abs_rhs.high != 0) diff --git a/include/boost/int128/hash.hpp b/include/boost/int128/hash.hpp index 9d87975e..83ec5dbb 100644 --- a/include/boost/int128/hash.hpp +++ b/include/boost/int128/hash.hpp @@ -54,7 +54,7 @@ struct hash auto operator()(const boost::int128::int128_t v) const noexcept -> std::size_t { const std::size_t low_hash {boost::int128::detail::hash_finalize_64(v.low)}; - const std::size_t high_hash {boost::int128::detail::hash_finalize_64(static_cast(v.high))}; + const std::size_t high_hash {boost::int128::detail::hash_finalize_64(v.high)}; // boost::hash_combine style mixing of the two finalized halves return low_hash ^ (high_hash + static_cast(0x9e3779b9) + (low_hash << 6) + (low_hash >> 2)); diff --git a/include/boost/int128/numeric.hpp b/include/boost/int128/numeric.hpp index e9ed9cfa..21aed57e 100644 --- a/include/boost/int128/numeric.hpp +++ b/include/boost/int128/numeric.hpp @@ -90,14 +90,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_add(c // When both are negative: overflow iff x < min - y (subtraction safe: min - negative > min) // Mixed signs: overflow is impossible. - if (x.high >= 0 && y.high >= 0) + if (x.signed_high() >= 0 && y.signed_high() >= 0) { if (x > (std::numeric_limits::max)() - y) { return (std::numeric_limits::max)(); } } - else if (x.high < 0 && y.high < 0) + else if (x.signed_high() < 0 && y.signed_high() < 0) { if (x < (std::numeric_limits::min)() - y) { @@ -115,14 +115,14 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t saturating_sub(c // Negative overflow: x < 0 and y >= 0 and x < min + y (safe: min + non_negative > min) // Same signs: overflow is impossible. - if (x.high >= 0 && y.high < 0) + if (x.signed_high() >= 0 && y.signed_high() < 0) { if (x > (std::numeric_limits::max)() + y) { return (std::numeric_limits::max)(); } } - else if (x.high < 0 && y.high >= 0) + else if (x.signed_high() < 0 && y.signed_high() >= 0) { if (x < (std::numeric_limits::min)() + y) { @@ -405,10 +405,10 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t midpoint(const i // comparison to avoid NVCC host compiler issues with operator<= and // static_cast on int128_t for large-magnitude values - const uint128_t ua {static_cast(a.high), a.low}; - const uint128_t ub {static_cast(b.high), b.low}; + const uint128_t ua {a.high, a.low}; + const uint128_t ub {b.high, b.low}; - const bool a_le_b {a.high == b.high ? a.low <= b.low : a.high < b.high}; + const bool a_le_b {a.high == b.high ? a.low <= b.low : a.signed_high() < b.signed_high()}; if (a_le_b) { diff --git a/include/boost/int128/utilities.hpp b/include/boost/int128/utilities.hpp index 5a0f10f2..2ccf907e 100644 --- a/include/boost/int128/utilities.hpp +++ b/include/boost/int128/utilities.hpp @@ -160,7 +160,7 @@ BOOST_INT128_EXPORT BOOST_INT128_HOST_DEVICE constexpr int128_t powm(const int12 uint128_t ub {}; - if (base.high < 0) + if (base.signed_high() < 0) { const uint128_t magnitude {static_cast(abs(base))}; const uint128_t r {magnitude % um}; diff --git a/test/Jamfile b/test/Jamfile index e1b478d8..405680e5 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -108,6 +108,7 @@ run test_container_hash.cpp : : : msvc:/wd4324 ; run test_boundaries.cpp ; run test_constexpr_boundaries.cpp ; +run test_layout.cpp ; # Make sure we run the examples as well run ../examples/construction.cpp ; diff --git a/test/benchmark_i128.cpp b/test/benchmark_i128.cpp index 4433a217..963b7483 100644 --- a/test/benchmark_i128.cpp +++ b/test/benchmark_i128.cpp @@ -30,6 +30,7 @@ # endif #endif +#include "benchmark_results.hpp" #include #include #include @@ -40,8 +41,10 @@ #include #include -constexpr unsigned N = 20'000'000; -constexpr unsigned K = 5; +// Element and repetition counts. They start at the defaults of the shared +// options and main() refreshes them from --elements and --repetitions. +std::size_t N {bench::config().elements}; +unsigned K {bench::config().repetitions}; using namespace std::chrono_literals; @@ -84,6 +87,61 @@ using namespace std::chrono_literals; #include using mp_i128 = boost::multiprecision::int128_t; +// Names of the implementations under test. The generated documentation tables and +// the plot legends use these labels verbatim, so each one spells the type the way +// a user would write it. +template +const char* impl_label() noexcept; + +template <> +const char* impl_label() noexcept +{ + return "int128_t"; +} + +template <> +const char* impl_label() noexcept +{ + return "boost::mp::int128_t"; +} + +#if defined(BOOST_INT128_HAS_INT128) + +template <> +const char* impl_label() noexcept +{ + return "__int128"; +} + +using baseline_type = boost::int128::detail::builtin_i128; + +#elif defined(BOOST_INT128_HAS_MSVC_INTERNAL_I128) + +template <> +const char* impl_label() noexcept +{ + return "std::_Signed128"; +} + +using baseline_type = std::_Signed128; + +#else + +// No hardware type on this platform, so Boost.Multiprecision is the reference. +using baseline_type = mp_i128; + +#endif + +#ifdef BOOST_INT128_BENCHMARK_ABSL + +template <> +const char* impl_label() noexcept +{ + return "absl::int128"; +} + +#endif + // 0 = 2 words // 1 = 1 word // 2 = 2 word / 1 word alternating @@ -99,7 +157,7 @@ T from_int128(const boost::int128::int128_t value) template <> mp_i128 from_int128(const boost::int128::int128_t value) { - return static_cast(value.high) << 64 | value.low; + return static_cast(static_cast(value.high)) << 64 | value.low; } #ifdef BOOST_INT128_HAS_MSVC_INTERNAL_I128 @@ -107,7 +165,7 @@ mp_i128 from_int128(const boost::int128::int128_t value) template <> std::_Signed128 from_int128(const boost::int128::int128_t value) { - return static_cast(value.high) << static_cast(64) | static_cast(value.low); + return static_cast(static_cast(value.high)) << static_cast(64) | static_cast(value.low); } #endif @@ -117,7 +175,7 @@ std::_Signed128 from_int128(const boost::int128::int128_t value) template <> absl::int128 from_int128(const boost::int128::int128_t value) { - return static_cast(value.high) << 64 | static_cast(value.low); + return static_cast(static_cast(value.high)) << 64 | static_cast(value.low); } #endif @@ -207,8 +265,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con } auto t2 = std::chrono::steady_clock::now(); + auto us = bench::elapsed_us(t1, t2); + bench::record("eq", impl_label(), us); - std::cerr << "EQ <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << "EQ <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -225,7 +285,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "NE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("ne", impl_label(), us); + + std::cerr << "NE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -242,7 +305,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "LT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("lt", impl_label(), us); + + std::cerr << "LT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -259,7 +325,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "LE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("le", impl_label(), us); + + std::cerr << "LE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -276,7 +345,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "GT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("gt", impl_label(), us); + + std::cerr << "GT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -293,9 +365,17 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "GE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("ge", impl_label(), us); - std::cerr << "SUM<" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t_total ) / 1us << " us (s=" << s << ")\n\n"; + std::cerr << "GE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; + + // The comparison row of the documentation tables is this total: every + // relational operator over the whole vector. + const auto total_us = bench::elapsed_us(t_total, t2); + bench::record("comparisons", impl_label(), total_us); + + std::cerr << "SUM<" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << total_us << " us (s=" << s << ")\n\n"; } template @@ -315,8 +395,10 @@ BOOST_INT128_NO_INLINE void test_two_element_operation(const std::vector& dat } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + bench::record(operation, impl_label(), us); - std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } // Benchmarks the narrow division overloads (128-bit divided by a 64-bit or 32-bit value), @@ -345,8 +427,10 @@ BOOST_INT128_NO_INLINE void test_narrow_division(const std::vector& data_vec, } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + bench::record(operation, impl_label(), us); - std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } std::vector generate_shift_vector() @@ -358,7 +442,7 @@ std::vector generate_shift_vector() std::vector data_vec; data_vec.reserve(N); - for (std::size_t i {}; i < data_vec.size(); ++i) + for (std::size_t i {}; i < N; ++i) { data_vec.emplace_back(dist(gen)); } @@ -381,8 +465,11 @@ BOOST_INT128_NO_INLINE void test_left_shift(const std::vector& data_vec, cons } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + + bench::record("shl", impl_label(), us); - std::cerr << "ls" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << "ls" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } template @@ -400,16 +487,25 @@ BOOST_INT128_NO_INLINE void test_right_shift(const std::vector& data_vec, con } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); - std::cerr << "rs" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + bench::record("shr", impl_label(), us); + + std::cerr << "rs" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } -int main() +int main(int argc, char* argv[]) { + bench::parse_options(argc, argv); + N = bench::config().elements; + K = bench::config().repetitions; + const auto shift_vector = generate_shift_vector(); // Two word operations { + bench::set_group("two_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "Two Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -532,6 +628,8 @@ int main() } // Single word operations { + bench::set_group("one_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "One Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -629,6 +727,8 @@ int main() { // Two word and one word operations Even = 2, odd = 1 + bench::set_group("two_one_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "Two-One Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -726,6 +826,8 @@ int main() { // Two word and one word operations Even = 1, odd = 2 + bench::set_group("one_two_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "One-Two Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -823,6 +925,8 @@ int main() { // Two word and one word operations Even = 1, odd = 2 + bench::set_group("random_width"); + std::cerr << "\n---------------------------\n"; std::cerr << "Random Width Operations\n"; std::cerr << "---------------------------\n\n"; @@ -944,6 +1048,9 @@ int main() std::cerr << std::endl; } + bench::write_json(bench::metadata{"int128_t", "i128", impl_label()}); + + // The Jamfile declares this target with run-fail, so a successful run reports 1. return 1; } diff --git a/test/benchmark_results.hpp b/test/benchmark_results.hpp new file mode 100644 index 00000000..6fa5bc18 --- /dev/null +++ b/test/benchmark_results.hpp @@ -0,0 +1,346 @@ +// Copyright 2026 Matt Borland +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP +#define BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP + +// Command line handling and result collection shared by benchmark_u128.cpp and +// benchmark_i128.cpp. Every timing is still printed to stderr as it is measured +// and is additionally recorded here. With --json the whole run is written +// out as the data set that doc/render_benchmarks.py turns into the documentation +// tables and plots, so refreshing the documentation never needs numbers to be +// transcribed by hand. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace bench { + +// One timing: the operand width group it ran in, the operation, the +// implementation under test, and the elapsed time in microseconds. +struct sample +{ + std::string group {}; + std::string operation {}; + std::string implementation {}; + std::int64_t microseconds {}; +}; + +// Identifies the data set being written. The labels name the types the way a +// user would write them because they appear verbatim in the documentation +// tables and in the plot legends. +struct metadata +{ + std::string type {}; + std::string sign {}; + std::string baseline {}; +}; + +// Run configuration. --elements and --repetitions exist so that emulated +// platforms can measure a smaller data set in a reasonable amount of time. +struct options +{ + std::string json_path {}; + std::size_t elements {20'000'000}; + unsigned repetitions {5}; +}; + +inline options& config() +{ + static options instance {}; + return instance; +} + +inline std::vector& samples() +{ + static std::vector instance {}; + return instance; +} + +inline std::string& current_group() +{ + static std::string instance {"unspecified"}; + return instance; +} + +// Names the operand width group that subsequent timings belong to. +inline void set_group(const char* group) +{ + current_group() = group; +} + +// Adds one timing to the data set under the current group. +inline void record(const char* operation, const char* implementation, const std::int64_t microseconds) +{ + samples().push_back(sample{current_group(), operation, implementation, microseconds}); +} + +// Microseconds between two clock readings, truncated like the stderr log. +template +std::int64_t elapsed_us(const TimePoint start, const TimePoint stop) +{ + return static_cast(std::chrono::duration_cast(stop - start).count()); +} + +// Operating system the data set was measured on; also selects the sub-folder of +// the documentation images tree. +inline const char* os_name() noexcept +{ + #if defined(_WIN32) + return "windows"; + #elif defined(__APPLE__) + return "macos"; + #elif defined(__linux__) + return "linux"; + #elif defined(__FreeBSD__) + return "freebsd"; + #elif defined(__CYGWIN__) + return "cygwin"; + #else + return "unknown"; + #endif +} + +// Architecture the data set was measured on; also the file stem of the plots. +inline const char* arch_name() noexcept +{ + // ARM64EC also defines _M_AMD64, so the AArch64 checks come first. + #if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) + return "ARM64"; + #elif defined(__arm__) || defined(_M_ARM) + return "ARM32"; + #elif defined(__x86_64__) || defined(__amd64__) || defined(_M_AMD64) + # if defined(__ILP32__) + return "x32"; + # else + return "x64"; + # endif + #elif defined(__i386__) || defined(_M_IX86) + return "x86"; + #elif defined(__s390x__) + return "s390x"; + #elif defined(__powerpc64__) || defined(__PPC64__) + # if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + return "ppc64le"; + # else + return "ppc64"; + # endif + #elif defined(__powerpc__) || defined(__PPC__) + return "ppc"; + #elif defined(__riscv) + # if defined(__riscv_xlen) && __riscv_xlen == 64 + return "riscv64"; + # else + return "riscv32"; + # endif + #elif defined(__loongarch64) + return "loongarch64"; + #else + return "unknown"; + #endif +} + +// Compiler and version, e.g. "GCC 14.2", "Clang 20.1", "MSVC 14.45". +inline std::string compiler_name() +{ + char buffer[64] {}; + + #if defined(__INTEL_LLVM_COMPILER) + std::snprintf(buffer, sizeof(buffer), "Intel oneAPI %d", __INTEL_LLVM_COMPILER); + #elif defined(__apple_build_version__) + std::snprintf(buffer, sizeof(buffer), "Apple Clang %d.%d", __clang_major__, __clang_minor__); + #elif defined(__clang__) + std::snprintf(buffer, sizeof(buffer), "Clang %d.%d", __clang_major__, __clang_minor__); + #elif defined(_MSC_VER) + // Toolset spelling: _MSC_VER 1945 is MSVC 14.45. + std::snprintf(buffer, sizeof(buffer), "MSVC %d.%d", _MSC_VER / 100 - 5, _MSC_VER % 100); + #elif defined(__GNUC__) + std::snprintf(buffer, sizeof(buffer), "GCC %d.%d", __GNUC__, __GNUC_MINOR__); + #else + std::snprintf(buffer, sizeof(buffer), "Unknown compiler"); + #endif + + return std::string{buffer}; +} + +// The language standard in use. MSVC only reports it through _MSVC_LANG unless +// /Zc:__cplusplus is given. +inline long cxxstd() noexcept +{ + #if defined(_MSVC_LANG) + return static_cast(_MSVC_LANG); + #else + return static_cast(__cplusplus); + #endif +} + +// Escapes the two characters that cannot appear raw in a JSON string. The labels +// we emit are plain ASCII type names, so this is belt and braces. +inline std::string escape(const std::string& value) +{ + std::string result {}; + result.reserve(value.size()); + + for (const auto character : value) + { + if (character == '"' || character == '\\') + { + result.push_back('\\'); + } + + result.push_back(character); + } + + return result; +} + +// The implementations in the order they were first measured, which is the column +// order used by the generated documentation tables. +inline std::vector implementations() +{ + std::vector result {}; + + for (const auto& entry : samples()) + { + auto seen = false; + for (const auto& name : result) + { + if (name == entry.implementation) + { + seen = true; + break; + } + } + + if (!seen) + { + result.push_back(entry.implementation); + } + } + + return result; +} + +// Writes the collected samples to config().json_path; does nothing when --json +// was not given. Returns false only if the file could not be written. +inline bool write_json(const metadata& meta) +{ + const auto& path = config().json_path; + if (path.empty()) + { + return true; + } + + std::ofstream out {path.c_str()}; + if (!out) + { + std::cerr << "error: cannot open " << path << " for writing" << std::endl; + return false; + } + + out << "{\n"; + out << " \"schema\": \"boost.int128.benchmarks/1\",\n"; + out << " \"type\": \"" << escape(meta.type) << "\",\n"; + out << " \"sign\": \"" << escape(meta.sign) << "\",\n"; + out << " \"os\": \"" << os_name() << "\",\n"; + out << " \"arch\": \"" << arch_name() << "\",\n"; + out << " \"compiler\": \"" << escape(compiler_name()) << "\",\n"; + out << " \"cxxstd\": " << cxxstd() << ",\n"; + out << " \"elements\": " << config().elements << ",\n"; + out << " \"repetitions\": " << config().repetitions << ",\n"; + out << " \"baseline\": \"" << escape(meta.baseline) << "\",\n"; + + out << " \"implementations\": ["; + const auto impls = implementations(); + for (std::size_t i {}; i < impls.size(); ++i) + { + out << (i == 0 ? "" : ", ") << '"' << escape(impls[i]) << '"'; + } + out << "],\n"; + + out << " \"results\": [\n"; + const auto& all = samples(); + for (std::size_t i {}; i < all.size(); ++i) + { + out << " {\"group\": \"" << escape(all[i].group) + << "\", \"operation\": \"" << escape(all[i].operation) + << "\", \"implementation\": \"" << escape(all[i].implementation) + << "\", \"microseconds\": " << all[i].microseconds << "}" + << (i + 1 == all.size() ? "\n" : ",\n"); + } + out << " ]\n"; + out << "}\n"; + + if (!out) + { + std::cerr << "error: failed while writing " << path << std::endl; + return false; + } + + std::cerr << "wrote " << all.size() << " timings to " << path << std::endl; + return true; +} + +inline void usage(const char* program) +{ + std::cerr << "usage: " << program << " [--json ] [--elements ] [--repetitions ]\n" + << " --json write the run out as a documentation data set\n" + << " --elements values per vector (default 20000000)\n" + << " --repetitions passes over each vector (default 5)" << std::endl; +} + +// Parses the command line, exiting on anything unrecognized so that a typo in a +// CI script cannot silently produce a data set with the wrong element count. +inline void parse_options(const int argc, char* argv[]) +{ + for (auto i = 1; i < argc; ++i) + { + const auto value = [argc, argv, &i]() -> const char* + { + if (i + 1 >= argc) + { + std::cerr << "error: " << argv[i] << " requires a value" << std::endl; + std::exit(2); + } + + return argv[++i]; + }; + + if (std::strcmp(argv[i], "--json") == 0) + { + config().json_path = value(); + } + else if (std::strcmp(argv[i], "--elements") == 0) + { + config().elements = static_cast(std::strtoull(value(), nullptr, 10)); + } + else if (std::strcmp(argv[i], "--repetitions") == 0) + { + config().repetitions = static_cast(std::strtoul(value(), nullptr, 10)); + } + else + { + usage(argv[0]); + std::exit(std::strcmp(argv[i], "--help") == 0 ? 0 : 2); + } + } + + if (config().elements < 2U || config().repetitions == 0U) + { + std::cerr << "error: --elements must be at least 2 and --repetitions at least 1" << std::endl; + std::exit(2); + } +} + +} // namespace bench + +#endif // BOOST_INT128_TEST_BENCHMARK_RESULTS_HPP diff --git a/test/benchmark_u128.cpp b/test/benchmark_u128.cpp index 767a1bb5..e1ee9c8a 100644 --- a/test/benchmark_u128.cpp +++ b/test/benchmark_u128.cpp @@ -32,6 +32,7 @@ #endif #include +#include "benchmark_results.hpp" #include #include #include @@ -47,8 +48,10 @@ # define BOOST_INT128_BENCHMARK_BUILTIN_GCD #endif -constexpr unsigned N = 20'000'000; -constexpr unsigned K = 5; +// Element and repetition counts. They start at the defaults of the shared +// options and main() refreshes them from --elements and --repetitions. +std::size_t N {bench::config().elements}; +unsigned K {bench::config().repetitions}; using namespace std::chrono_literals; @@ -91,6 +94,61 @@ using namespace std::chrono_literals; #include using mp_u128 = boost::multiprecision::uint128_t; +// Names of the implementations under test. The generated documentation tables and +// the plot legends use these labels verbatim, so each one spells the type the way +// a user would write it. +template +const char* impl_label() noexcept; + +template <> +const char* impl_label() noexcept +{ + return "uint128_t"; +} + +template <> +const char* impl_label() noexcept +{ + return "boost::mp::uint128_t"; +} + +#if defined(BOOST_INT128_HAS_INT128) + +template <> +const char* impl_label() noexcept +{ + return "unsigned __int128"; +} + +using baseline_type = boost::int128::detail::builtin_u128; + +#elif defined(BOOST_INT128_HAS_MSVC_INTERNAL_I128) + +template <> +const char* impl_label() noexcept +{ + return "std::_Unsigned128"; +} + +using baseline_type = std::_Unsigned128; + +#else + +// No hardware type on this platform, so Boost.Multiprecision is the reference. +using baseline_type = mp_u128; + +#endif + +#ifdef BOOST_INT128_BENCHMARK_ABSL + +template <> +const char* impl_label() noexcept +{ + return "absl::uint128"; +} + +#endif + // 0 = 2 words // 1 = 1 word // 2 = 2 word / 1 word alternating @@ -225,8 +283,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con } auto t2 = std::chrono::steady_clock::now(); + auto us = bench::elapsed_us(t1, t2); + bench::record("eq", impl_label(), us); - std::cerr << "EQ <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << "EQ <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -243,7 +303,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "NE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("ne", impl_label(), us); + + std::cerr << "NE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -260,7 +323,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "LT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("lt", impl_label(), us); + + std::cerr << "LT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -277,7 +343,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "LE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("le", impl_label(), us); + + std::cerr << "LE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -294,7 +363,10 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "GT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("gt", impl_label(), us); + + std::cerr << "GT <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; t1 = std::chrono::steady_clock::now(); s = 0; @@ -311,9 +383,17 @@ BOOST_INT128_NO_INLINE void test_comparisons(const std::vector& data_vec, con t2 = std::chrono::steady_clock::now(); - std::cerr << "GE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + us = bench::elapsed_us(t1, t2); + bench::record("ge", impl_label(), us); - std::cerr << "SUM<" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << ( t2 - t_total ) / 1us << " us (s=" << s << ")\n\n"; + std::cerr << "GE <" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; + + // The comparison row of the documentation tables is this total: every + // relational operator over the whole vector. + const auto total_us = bench::elapsed_us(t_total, t2); + bench::record("comparisons", impl_label(), total_us); + + std::cerr << "SUM<" << std::left << std::setw(11) << label << ">: " << std::setw( 10 ) << total_us << " us (s=" << s << ")\n\n"; } template @@ -333,8 +413,10 @@ BOOST_INT128_NO_INLINE void test_two_element_operation(const std::vector& dat } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + bench::record(operation, impl_label(), us); - std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } // Benchmarks the narrow division overloads (128-bit divided by a 64-bit or 32-bit value), @@ -363,8 +445,10 @@ BOOST_INT128_NO_INLINE void test_narrow_division(const std::vector& data_vec, } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + bench::record(operation, impl_label(), us); - std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << operation << "<" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } template @@ -404,7 +488,7 @@ std::vector generate_shift_vector() std::vector data_vec; data_vec.reserve(N); - for (std::size_t i {}; i < data_vec.size(); ++i) + for (std::size_t i {}; i < N; ++i) { data_vec.emplace_back(dist(gen)); } @@ -427,8 +511,11 @@ BOOST_INT128_NO_INLINE void test_right_shift(const std::vector& data_vec, con } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); - std::cerr << "rs" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + bench::record("shr", impl_label(), us); + + std::cerr << "rs" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } template @@ -446,8 +533,11 @@ BOOST_INT128_NO_INLINE void test_left_shift(const std::vector& data_vec, cons } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + + bench::record("shl", impl_label(), us); - std::cerr << "ls" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << "ls" << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } enum class bitwise_operation @@ -457,6 +547,22 @@ enum class bitwise_operation b_xor }; +// Name of one bitwise operation in the data set. +const char* bitwise_key(const bitwise_operation op) noexcept +{ + switch (op) + { + case bitwise_operation::b_and: + return "and"; + case bitwise_operation::b_or: + return "or"; + case bitwise_operation::b_xor: + return "xor"; + } + + return "unknown"; +} + template BOOST_INT128_NO_INLINE void test_operator_bitwise(const std::vector& data_vec, const bitwise_operation op, const char* type) { @@ -495,6 +601,8 @@ BOOST_INT128_NO_INLINE void test_operator_bitwise(const std::vector& data_vec } const auto t2 = std::chrono::steady_clock::now(); + const auto us = bench::elapsed_us(t1, t2); + bench::record(bitwise_key(op), impl_label(), us); switch (op) { @@ -509,17 +617,23 @@ BOOST_INT128_NO_INLINE void test_operator_bitwise(const std::vector& data_vec break; } - std::cerr << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << ( t2 - t1 ) / 1us << " us (s=" << s << ")\n"; + std::cerr << " <" << std::left << std::setw(11) << type << ">: " << std::setw( 10 ) << us << " us (s=" << s << ")\n"; } -int main() +int main(int argc, char* argv[]) { using namespace boost::int128::detail; + bench::parse_options(argc, argv); + N = bench::config().elements; + K = bench::config().repetitions; + const auto shift_vector = generate_shift_vector(); // Two word operations { + bench::set_group("two_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "Two Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -653,6 +767,8 @@ int main() } // Single word operations { + bench::set_group("one_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "One Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -752,6 +868,8 @@ int main() { // Two word and one word operations Even = 2, odd = 1 + bench::set_group("two_one_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "Two-One Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -849,6 +967,8 @@ int main() { // Two word and one word operations Even = 1, odd = 2 + bench::set_group("one_two_word"); + std::cerr << "\n---------------------------\n"; std::cerr << "One-Two Word Operations\n"; std::cerr << "---------------------------\n\n"; @@ -945,6 +1065,8 @@ int main() { // Two word and one word operations Even = 1, odd = 2 + bench::set_group("random_width"); + std::cerr << "\n---------------------------\n"; std::cerr << "Random Width Operations\n"; std::cerr << "---------------------------\n\n"; @@ -1108,6 +1230,9 @@ int main() } + bench::write_json(bench::metadata{"uint128_t", "u128", impl_label()}); + + // The Jamfile declares this target with run-fail, so a successful run reports 1. return 1; } diff --git a/test/github_issue_432.cpp b/test/github_issue_432.cpp index b9e2986e..0dfd6ebb 100644 --- a/test/github_issue_432.cpp +++ b/test/github_issue_432.cpp @@ -56,7 +56,7 @@ void test_small_negative_values() // The portable fallback must also be correct on platforms // where the operator uses the builtin conversion instead - BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(value.high, value.low), static_cast(v)); + BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(value.signed_high(), value.low), static_cast(v)); } } @@ -70,7 +70,7 @@ void test_signed_powers_of_two() const T expected {-std::ldexp(static_cast(1), k)}; BOOST_TEST_EQ(static_cast(value), expected); - BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(value.high, value.low), expected); + BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(value.signed_high(), value.low), expected); } // INT128_MIN itself: the magnitude 2^127 does not fit in int128_t, @@ -79,7 +79,7 @@ void test_signed_powers_of_two() const T expected_min {-std::ldexp(static_cast(1), 127)}; BOOST_TEST_EQ(static_cast(min_value), expected_min); - BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(min_value.high, min_value.low), expected_min); + BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(min_value.signed_high(), min_value.low), expected_min); // This fails with 32-bit ASAN but passes on the same compiler without ASAN // libs/int128/test/github_issue_432.cpp(86): test 'static_cast(min_value + 1) == expected_min' ('-1.70141e+38' == '-1.70141e+38') failed in function 'void test_signed_powers_of_two() [with T = float]' @@ -162,13 +162,13 @@ void test_vs_builtin() // negative values, which this catches with a huge margin BOOST_TEST(within_one_ulp(boost::int128::detail::unsigned_words_to_float(hi, lo), static_cast(builtin_u))); - BOOST_TEST(within_one_ulp(boost::int128::detail::signed_words_to_float(s.high, s.low), + BOOST_TEST(within_one_ulp(boost::int128::detail::signed_words_to_float(s.signed_high(), s.low), static_cast(builtin_s))); // The fallback must never lose the sign the way the cancellation defect did if (builtin_s != 0) { - BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(s.high, s.low) < 0, builtin_s < 0); + BOOST_TEST_EQ(boost::int128::detail::signed_words_to_float(s.signed_high(), s.low) < 0, builtin_s < 0); } } } diff --git a/test/sycl_test.hpp b/test/sycl_test.hpp index d48925f5..bbf02c78 100644 --- a/test/sycl_test.hpp +++ b/test/sycl_test.hpp @@ -19,6 +19,7 @@ #include #include #include +#include namespace int128_sycl_test { @@ -32,7 +33,10 @@ constexpr int buf_size {static_cast(boost::int128::detail::mini_to_chars_bu template T random_value(std::mt19937_64& rng) { - using high_type = decltype(T{}.high); + // Both types store the high word unsigned, but the signed type's two word + // constructor still takes it signed, so this is not decltype(T{}.high). + using high_type = typename std::conditional::is_signed, + std::int64_t, std::uint64_t>::type; return T{static_cast(rng()), static_cast(rng())}; } diff --git a/test/test_boundaries.cpp b/test/test_boundaries.cpp index d36f9585..490948a9 100644 --- a/test/test_boundaries.cpp +++ b/test/test_boundaries.cpp @@ -26,7 +26,7 @@ std::uint64_t opaque(std::uint64_t v) int128_t opaque(int128_t v) { - return int128_t{opaque(static_cast(v.high)), opaque(static_cast(v.low))}; + return int128_t{opaque(v.signed_high()), opaque(v.low)}; } } // namespace diff --git a/test/test_builtin_parity.cpp b/test/test_builtin_parity.cpp index 5ad84e3a..3f3b25df 100644 --- a/test/test_builtin_parity.cpp +++ b/test/test_builtin_parity.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #ifdef BOOST_INT128_HAS_INT128 @@ -323,6 +324,149 @@ void test_int128_vs_builtin_u128() } } +// ========================================================================= +// Signed boundary values +// +// The random sweeps above rarely land on the values where sign handling is +// easiest to get wrong. Every sign-dependent codepath (ordering, arithmetic +// right shift, division, abs, saturation, float conversion) is checked here +// against the builtin over an exhaustive cross product of boundary values. +// ========================================================================= + +template +static bool same_bits(const Float lhs, const Float rhs) noexcept +{ + unsigned char l[sizeof(Float)] {}; + unsigned char r[sizeof(Float)] {}; + std::memcpy(l, &lhs, sizeof(Float)); + std::memcpy(r, &rhs, sizeof(Float)); + return std::memcmp(l, r, sizeof(Float)) == 0; +} + +void test_signed_boundaries() +{ + const builtin_i128 one {1}; + const builtin_u128 top_bit {static_cast(1) << 127}; + + const builtin_i128 values[] { + 0, + 1, + -1, + 2, + -2, + static_cast(top_bit), // INT128_MIN + static_cast(top_bit) + 1, // INT128_MIN + 1 + static_cast(~top_bit), // INT128_MAX + static_cast(~top_bit) - 1, + static_cast(static_cast(UINT64_MAX)), + -static_cast(static_cast(UINT64_MAX)), + static_cast(one << 64), + -static_cast(one << 64), + static_cast(one << 63), + -static_cast(one << 63), + static_cast(static_cast(INT64_MIN) << 64) + }; + + constexpr std::size_t count {sizeof(values) / sizeof(values[0])}; + + for (std::size_t i {0}; i < count; ++i) + { + const auto raw_a {values[i]}; + const int128_t a {raw_a}; + + // Unary and conversion. + BOOST_TEST_EQ(-a, int128_t{static_cast(0U - static_cast(raw_a))}); + BOOST_TEST_EQ(~a, int128_t{static_cast(~static_cast(raw_a))}); + BOOST_TEST_EQ(int128_t{static_cast(a)}, int128_t{raw_a}); + BOOST_TEST_EQ(a.signed_high(), static_cast(static_cast(raw_a) >> 64)); + + // abs(INT128_MIN) has no representable result; it wraps, like the builtin. + BOOST_TEST_EQ(boost::int128::abs(a), + int128_t{static_cast(raw_a < 0 ? 0U - static_cast(raw_a) + : static_cast(raw_a))}); + + // Float conversion is the other place the sign is applied by hand. Compared + // as bit patterns: both sides round identically, and this test builds with + // -Wfloat-equal, which a pragma here could not suppress inside BOOST_TEST_EQ. + BOOST_TEST(same_bits(static_cast(a), static_cast(raw_a))); + BOOST_TEST(same_bits(static_cast(a), static_cast(raw_a))); + + // Arithmetic right shift fills with the sign bit at every distance. + for (unsigned shift {0}; shift < 128U; ++shift) + { + BOOST_TEST_EQ(a >> shift, int128_t{raw_a >> shift}); + BOOST_TEST_EQ(a << shift, + int128_t{static_cast(static_cast(raw_a) << shift)}); + } + + for (std::size_t j {0}; j < count; ++j) + { + const auto raw_b {values[j]}; + const int128_t b {raw_b}; + + BOOST_TEST_EQ(a == b, raw_a == raw_b); + BOOST_TEST_EQ(a != b, raw_a != raw_b); + BOOST_TEST_EQ(a < b, raw_a < raw_b); + BOOST_TEST_EQ(a <= b, raw_a <= raw_b); + BOOST_TEST_EQ(a > b, raw_a > raw_b); + BOOST_TEST_EQ(a >= b, raw_a >= raw_b); + + // Computed through the unsigned domain: signed overflow is UB for the oracle. + const builtin_u128 ua {static_cast(raw_a)}; + const builtin_u128 ub {static_cast(raw_b)}; + BOOST_TEST_EQ(a + b, int128_t{static_cast(ua + ub)}); + BOOST_TEST_EQ(a - b, int128_t{static_cast(ua - ub)}); + BOOST_TEST_EQ(a * b, int128_t{static_cast(ua * ub)}); + + // INT128_MIN / -1 overflows; the builtin traps on it, so skip that pair. + const bool overflowing_div {raw_b == -1 && raw_a == static_cast(top_bit)}; + if (raw_b != 0 && !overflowing_div) + { + BOOST_TEST_EQ(a / b, int128_t{raw_a / raw_b}); + BOOST_TEST_EQ(a % b, int128_t{raw_a % raw_b}); + + const auto qr {boost::int128::div(a, b)}; + BOOST_TEST_EQ(qr.quot, int128_t{raw_a / raw_b}); + BOOST_TEST_EQ(qr.rem, int128_t{raw_a % raw_b}); + } + + BOOST_TEST_EQ(a | b, int128_t{static_cast(ua | ub)}); + BOOST_TEST_EQ(a & b, int128_t{static_cast(ua & ub)}); + BOOST_TEST_EQ(a ^ b, int128_t{static_cast(ua ^ ub)}); + + // Saturating arithmetic clamps instead of wrapping. + const builtin_i128 sum {static_cast(ua + ub)}; + const bool add_overflowed {(raw_a < 0) == (raw_b < 0) && (sum < 0) != (raw_a < 0)}; + const builtin_i128 expected_add {add_overflowed + ? (raw_a < 0 ? static_cast(top_bit) : static_cast(~top_bit)) + : sum}; + BOOST_TEST_EQ(boost::int128::saturating_add(a, b), int128_t{expected_add}); + + const builtin_i128 diff {static_cast(ua - ub)}; + const bool sub_overflowed {(raw_a < 0) != (raw_b < 0) && (diff < 0) != (raw_a < 0)}; + const builtin_i128 expected_sub {sub_overflowed + ? (raw_a < 0 ? static_cast(top_bit) : static_cast(~top_bit)) + : diff}; + BOOST_TEST_EQ(boost::int128::saturating_sub(a, b), int128_t{expected_sub}); + + // midpoint rounds toward the first argument. Neither expression below can + // overflow: b - a is representable when the signs agree, and a + b is + // representable when they differ. + builtin_i128 mid {}; + if ((raw_a < 0) == (raw_b < 0)) + { + mid = raw_a + (raw_b - raw_a) / 2; + } + else + { + const builtin_i128 straddling_sum {raw_a + raw_b}; + mid = (straddling_sum >> 1) + ((straddling_sum & 1) != 0 && raw_a > raw_b ? 1 : 0); + } + BOOST_TEST_EQ(boost::int128::midpoint(a, b), int128_t{mid}); + } + } +} + #endif // BOOST_INT128_HAS_INT128 int main() @@ -342,6 +486,7 @@ int main() test_cross_type(); test_uint128_vs_builtin_i128(); test_int128_vs_builtin_u128(); + test_signed_boundaries(); #endif diff --git a/test/test_cross_type_assign.cpp b/test/test_cross_type_assign.cpp index 1bd0919a..f3274c59 100644 --- a/test/test_cross_type_assign.cpp +++ b/test/test_cross_type_assign.cpp @@ -77,18 +77,18 @@ void test_uint_to_int_construction() // Copy construction with braces const int128_t a {u}; BOOST_TEST_EQ(a.low, u.low); - BOOST_TEST_EQ(static_cast(a.high), u.high); + BOOST_TEST_EQ(a.high, u.high); // Copy-initialization (implicit conversion) const int128_t b = u; BOOST_TEST_EQ(b.low, u.low); - BOOST_TEST_EQ(static_cast(b.high), u.high); + BOOST_TEST_EQ(b.high, u.high); // Move construction uint128_t u_movable {1U, 42U}; const int128_t c {std::move(u_movable)}; BOOST_TEST_EQ(c.low, 42U); - BOOST_TEST_EQ(c.high, 1); + BOOST_TEST_EQ(c.high, UINT64_C(1)); } void test_int_to_uint_construction() @@ -97,11 +97,11 @@ void test_int_to_uint_construction() const uint128_t a {i}; BOOST_TEST_EQ(a.low, i.low); - BOOST_TEST_EQ(a.high, static_cast(i.high)); + BOOST_TEST_EQ(a.high, i.high); const uint128_t b = i; BOOST_TEST_EQ(b.low, i.low); - BOOST_TEST_EQ(b.high, static_cast(i.high)); + BOOST_TEST_EQ(b.high, i.high); int128_t i_movable {-1, 0xFFFFFFFFFFFFFFFFULL}; const uint128_t c {std::move(i_movable)}; @@ -200,10 +200,10 @@ void test_int_from_float() { // Basic positive and negative BOOST_TEST_EQ(int128_t{Float{0}}.low, 0U); - BOOST_TEST_EQ(int128_t{Float{0}}.high, 0); + BOOST_TEST_EQ(int128_t{Float{0}}.signed_high(), INT64_C(0)); BOOST_TEST_EQ(int128_t{Float{42}}.low, 42U); BOOST_TEST_EQ(int128_t{Float{-42}}.low, static_cast(-42)); - BOOST_TEST_EQ(int128_t{Float{-42}}.high, -1); + BOOST_TEST_EQ(int128_t{Float{-42}}.signed_high(), INT64_C(-1)); // Truncation toward zero (see note in test_uint_from_float on the literal style). BOOST_TEST_EQ((int128_t{Float{37} / Float{10}}.low), 3U); // ~3.7 -> 3 @@ -212,18 +212,18 @@ void test_int_from_float() // NaN -> 0 const Float nan {std::numeric_limits::quiet_NaN()}; BOOST_TEST_EQ(int128_t{nan}.low, 0U); - BOOST_TEST_EQ(int128_t{nan}.high, 0); + BOOST_TEST_EQ(int128_t{nan}.signed_high(), INT64_C(0)); // Positive saturation: f >= 2^127 -> INT128_MAX const Float two_64 {static_cast(UINT64_C(1) << 32) * static_cast(UINT64_C(1) << 32)}; const Float two_127 {two_64 * static_cast(UINT64_C(1) << 63)}; const int128_t pos_sat {two_127}; - BOOST_TEST_EQ(pos_sat.high, (std::numeric_limits::max)()); + BOOST_TEST_EQ(pos_sat.signed_high(), (std::numeric_limits::max)()); BOOST_TEST_EQ(pos_sat.low, UINT64_MAX); // Negative saturation: f <= -2^127 -> INT128_MIN const int128_t neg_sat {-two_127}; - BOOST_TEST_EQ(neg_sat.high, (std::numeric_limits::min)()); + BOOST_TEST_EQ(neg_sat.signed_high(), (std::numeric_limits::min)()); BOOST_TEST_EQ(neg_sat.low, 0U); // Just below the positive boundary should not saturate. @@ -234,7 +234,7 @@ void test_int_from_float() // Round-trip a negative power of two through the two's-complement path const int128_t neg_round_trip {-two_64}; // -2^64 BOOST_TEST_EQ(neg_round_trip.low, 0U); - BOOST_TEST_EQ(neg_round_trip.high, -1); + BOOST_TEST_EQ(neg_round_trip.signed_high(), INT64_C(-1)); } void test_constexpr_float_construction() @@ -243,7 +243,7 @@ void test_constexpr_float_construction() static_assert(u.low == 42U, "constexpr uint from double"); constexpr int128_t i {-7.9}; - static_assert(i.high == -1, "constexpr int from double sign"); + static_assert(i.signed_high() == -1, "constexpr int from double sign"); // NaN -> 0 is exercised at runtime in test_uint_from_float / test_int_from_float. // It cannot be constant-evaluated on GCC 9, which rejects NaN comparisons in diff --git a/test/test_layout.cpp b/test/test_layout.cpp new file mode 100644 index 00000000..5a6f54cc --- /dev/null +++ b/test/test_layout.cpp @@ -0,0 +1,144 @@ +// Copyright 2026 Matt Borland +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt +// +// Pins the storage layout of int128_t and uint128_t. Both halves of int128_t are +// deliberately std::uint64_t so that the two words have the same type; when they +// differ the vectorizer cannot merge them and loops over int128_t are scalarized. +// Sign is recovered through signed_high(), which these tests also exercise. + +#ifndef BOOST_INT128_BUILD_MODULE + +#include + +#else + +import boost.int128; +#include + +#endif + +#include +#include +#include +#include +#include + +using boost::int128::int128_t; +using boost::int128::uint128_t; + +// Both words of both types are unsigned. Changing either of these regresses the +// codegen this layout exists to enable. +static_assert(std::is_same::value, + "int128_t::high must be std::uint64_t; use signed_high() to read it as signed"); +static_assert(std::is_same::value, + "int128_t::low must be std::uint64_t"); +static_assert(std::is_same::value, + "uint128_t::high must be std::uint64_t"); +static_assert(std::is_same::value, + "uint128_t::low must be std::uint64_t"); + +static_assert(std::is_same::value, + "signed_high() must yield std::int64_t"); + +static_assert(sizeof(int128_t) == 16, "int128_t must be exactly 128 bits wide"); +static_assert(sizeof(uint128_t) == 16, "uint128_t must be exactly 128 bits wide"); +static_assert(alignof(int128_t) == alignof(uint128_t), "both types must agree on alignment"); + +static_assert(std::is_trivially_copyable::value, "int128_t must be trivially copyable"); +static_assert(std::is_trivially_copyable::value, "uint128_t must be trivially copyable"); +static_assert(std::is_standard_layout::value, "int128_t must be standard layout"); +static_assert(std::is_standard_layout::value, "uint128_t must be standard layout"); + +// The words sit in memory in the platform's own order, so a memcpy of the object +// matches a memcpy of the two words in that order. +void test_word_order() +{ + const int128_t v {INT64_C(-2), UINT64_C(0x0123456789ABCDEF)}; + + unsigned char from_object[sizeof(int128_t)] {}; + std::memcpy(from_object, &v, sizeof(v)); + + unsigned char from_words[sizeof(int128_t)] {}; + #if BOOST_INT128_ENDIAN_LITTLE_BYTE + std::memcpy(from_words, &v.low, sizeof(v.low)); + std::memcpy(from_words + sizeof(v.low), &v.high, sizeof(v.high)); + #else + std::memcpy(from_words, &v.high, sizeof(v.high)); + std::memcpy(from_words + sizeof(v.high), &v.low, sizeof(v.low)); + #endif + + BOOST_TEST_EQ(std::memcmp(from_object, from_words, sizeof(int128_t)), 0); +} + +// signed_high() is a pure reinterpretation of the stored bits. +void test_signed_high_round_trip() +{ + const std::int64_t highs[] { + INT64_C(0), INT64_C(1), INT64_C(-1), INT64_C(2), INT64_C(-2), + INT64_MAX, INT64_MIN, INT64_MIN + 1, INT64_MAX - 1, INT64_C(-1000003) + }; + + for (const auto h : highs) + { + const int128_t v {h, UINT64_C(0xDEADBEEFCAFEF00D)}; + + BOOST_TEST_EQ(v.signed_high(), h); + BOOST_TEST_EQ(v.high, static_cast(h)); + BOOST_TEST_EQ(static_cast(v.high), h); + + // The sign of the value is the sign of the high word. + BOOST_TEST_EQ(v < 0, h < 0); + BOOST_TEST_EQ(v.signed_high() < 0, h < 0); + } +} + +// The two types share a representation, so converting between them moves no bits. +void test_interconversion_is_bit_preserving() +{ + const int128_t signed_values[] { + int128_t{0, 0}, + int128_t{-1, UINT64_MAX}, + int128_t{INT64_MIN, 0}, + int128_t{INT64_MAX, UINT64_MAX}, + int128_t{-1, 0}, + int128_t{0, UINT64_MAX} + }; + + for (const auto& s : signed_values) + { + const uint128_t u {s}; + BOOST_TEST_EQ(u.high, s.high); + BOOST_TEST_EQ(u.low, s.low); + + const int128_t back {u}; + BOOST_TEST_EQ(back.high, s.high); + BOOST_TEST_EQ(back.low, s.low); + } +} + +// The two word constructor still takes its high word signed, so brace initialization +// from a negative literal keeps working. +void test_two_word_construction() +{ + constexpr int128_t minus_one {-1, UINT64_MAX}; + static_assert(minus_one.high == UINT64_MAX, "-1 sign extends into the high word"); + static_assert(minus_one.signed_high() == -1, "signed_high sees the sign"); + + constexpr int128_t int128_min {INT64_MIN, 0}; + static_assert(int128_min.high == (UINT64_C(1) << 63), "INT128_MIN high word"); + static_assert(int128_min.signed_high() == INT64_MIN, "INT128_MIN reads back signed"); + + BOOST_TEST(minus_one == -1); + BOOST_TEST(int128_min == (std::numeric_limits::min)()); +} + +int main() +{ + test_word_order(); + test_signed_high_round_trip(); + test_interconversion_is_bit_preserving(); + test_two_word_construction(); + + return boost::report_errors(); +} diff --git a/test/test_signed_midpoint.cu b/test/test_signed_midpoint.cu index e974745c..f2cba237 100644 --- a/test/test_signed_midpoint.cu +++ b/test/test_signed_midpoint.cu @@ -83,10 +83,10 @@ int main(void) if (fail_count < 5) { std::cerr << "Result verification failed at element " << i << std::endl; - std::cerr << " input1 high: " << input_vector[i].high << " low: " << input_vector[i].low << std::endl; - std::cerr << " input2 high: " << input_vector2[i].high << " low: " << input_vector2[i].low << std::endl; - std::cerr << " GPU high: " << output_vector[i].high << " low: " << output_vector[i].low << std::endl; - std::cerr << " CPU high: " << results[i].high << " low: " << results[i].low << std::endl; + std::cerr << " input1 high: " << input_vector[i].signed_high() << " low: " << input_vector[i].low << std::endl; + std::cerr << " input2 high: " << input_vector2[i].signed_high() << " low: " << input_vector2[i].low << std::endl; + std::cerr << " GPU high: " << output_vector[i].signed_high() << " low: " << output_vector[i].low << std::endl; + std::cerr << " CPU high: " << results[i].signed_high() << " low: " << results[i].low << std::endl; } ++fail_count; } diff --git a/test/test_signed_saturating_add.cu b/test/test_signed_saturating_add.cu index 3f1b8081..5ca06a3d 100644 --- a/test/test_signed_saturating_add.cu +++ b/test/test_signed_saturating_add.cu @@ -83,10 +83,10 @@ int main(void) if (fail_count < 5) { std::cerr << "Result verification failed at element " << i << std::endl; - std::cerr << " input1 high: " << input_vector[i].high << " low: " << input_vector[i].low << std::endl; - std::cerr << " input2 high: " << input_vector2[i].high << " low: " << input_vector2[i].low << std::endl; - std::cerr << " GPU high: " << output_vector[i].high << " low: " << output_vector[i].low << std::endl; - std::cerr << " CPU high: " << results[i].high << " low: " << results[i].low << std::endl; + std::cerr << " input1 high: " << input_vector[i].signed_high() << " low: " << input_vector[i].low << std::endl; + std::cerr << " input2 high: " << input_vector2[i].signed_high() << " low: " << input_vector2[i].low << std::endl; + std::cerr << " GPU high: " << output_vector[i].signed_high() << " low: " << output_vector[i].low << std::endl; + std::cerr << " CPU high: " << results[i].signed_high() << " low: " << results[i].low << std::endl; } ++fail_count; }