• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stillwater-sc / universal / 41995740215
89%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 05 Nov 2026 09:08AM UTC
Jobs 1
Files 773
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Nov 2026 08:36AM UTC coverage: 88.56% (-0.02%) from 88.577%
41995740215

push

github

web-flow
perf(posit): decode and encode arithmetic operands on 64-bit limbs (#1927)

posit add, mul and div spent nearly all their time outside the arithmetic.
At 128 bits the blocktriple add takes 5 ns of a 900 ns operator+=. The rest
went to two places:
- The decode, extract_fields(), copied the fraction one bit at a time.
- The encode, convert(blocktriple) and convert_(), copied the result out bit
  by bit and rebuilt the posit by OR-ing shifted multi-limb temporaries.
Both cost a few ns per bit, at every width and BlockType. Conversion from
double above 64 bits goes through convert_() as well.

The arithmetic now uses posit_limbs, the 64-bit limb decoder and encoder
that sqrt has used since #1857:
- normalize(), normalizeAddition(), normalizeMultiplication() and
  normalizeDivision() share a new unpack(): gather the encoding, negate it if
  negative, decode the scale and fraction, and place 1.f in the blocktriple
  with one window load.
- convert(blocktriple) gathers the significand, finds its MSB, left-aligns it
  and rounds once with posit_limbs::encode().
- convert_() does the same from its blocksignificand.
- Conversion from double above 64 bits encodes the significand from one limb.
posit_limbs.hpp moves from posit/math/ to posit/, since the core needs it.
Its functions become constexpr, so constexpr posit += and *= still work.
encode() takes the sign, and gather() reads any blockbinary.

blockbinary::to_ull() built its result one at() call at a time. It now ORs
in the blocks, with the same bits returned. With clang, that read was most
of posit<64,2> sqrt with uint8/16/32_t limbs.

Measured with the BlockType benchmark (i7-12700K, taskset -c 2), against
the README baseline:
- add: 56 to 275 ns with gcc (was 430 to 1794) and 33 to 163 ns with clang
  (was 425 to 1685).
- mul: 4.9x to 38x faster. div: 2.2x to 4.3x faster.
- Conversion from double above 64 bits: 15 to 37 ns with gcc (was 387 to
  824) and 4.7 to 13.6 ns with clang (was 360 to 791).
- cla... (continued)

74 of 76 new or added lines in 3 files covered. (97.37%)

56219 of 63481 relevant lines covered (88.56%)

8744443.77 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
95.55
-0.63% include/sw/universal/number/posit/posit_impl.hpp
Jobs
ID Job ID Ran Files Coverage
1 41995740215.1 05 Nov 2026 09:08AM UTC 773
88.56
GitHub Action Run
Source Files on build 41995740215
  • Tree
  • List 773
  • Changed 8
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41995740215
  • 01404717 on github
  • Prev Build on main (#41986790434)
  • Next Build on main (#42072725949)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc