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

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

Build:
Build:
LAST BUILD BRANCH: fix/fixpnt-quire-resolve-saturates
DEFAULT BRANCH: master
Ran 05 Nov 2026 07:47AM 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 07:22AM UTC coverage: 88.577% (+0.001%) from 88.576%
41986790434

push

github

web-flow
perf(cfloat): compare encodings in operator< instead of subtracting (#1926)

With subnormals, operator< computed lhs - rhs and tested the sign of the
difference, so a comparison cost a full subtraction: 300 ns for
cfloat<196,19,uint64_t> with gcc, and 440 ns for cfloat<256,19,uint8_t>.
Without subnormals it compared scale() and then copied both fractions into
blockbinary temporaries.

The encoding is sign-magnitude, and with NaN set aside the magnitude bits
order the values: the exponent field sits above the fraction, subnormals
have the all-zeros exponent, and inf is the successor of maxpos. So after
the NaN and both-zero checks, operator< compares the signs and then the
magnitudes limb by limb from the MSU down, reversed for negatives. Without
subnormals every all-zeros-exponent encoding is a zero, and those encodings
still sort below every normal, so one compare serves both configurations.
operator> drops its inf checks, which only guarded the subtraction.

Measured with the BlockType benchmark (i7-12700K, taskset -c 2), lt now
costs 1.0 to 2.1 ns with gcc (was 13 to 440) and 1.2 to 3.3 ns with clang
(was 17 to 353), at every width and BlockType.

New test logic/ordering.cpp holds all six relational operators to the value
order: every pair of encodings of five small configurations in all eight
flag combinations against double, random 3-limb pairs against double, and
random, neighbouring (one bit flipped, low or anywhere) and negated wide
pairs against the sign of the difference. The previous operators pass it
too, so results are unchanged.

Resolves #1920

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

13 of 13 new or added lines in 1 file covered. (100.0%)

56305 of 63566 relevant lines covered (88.58%)

8984136.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 41986790434.1 05 Nov 2026 07:47AM UTC 773
88.58
GitHub Action Run
Source Files on build 41986790434
  • Tree
  • List 773
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41986790434
  • c8f8516e on github
  • Prev Build on main (#41973428347)
  • Next Build on main (#41995740215)
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