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

ben-manes / caffeine / #4633
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 16 Nov 2024 10:17PM UTC
Jobs 1
Files 78
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

16 Nov 2024 09:16PM UTC coverage: 99.04% (-0.03%) from 99.065%
#4633

push

github

ben-manes
optimize the frequency sketch

In an earlier analysis the block-based sketch was significantly faster
than the flat (uniform) one. This was independently confirmed by a C#
and Go port, who also observed a 2x speed up. However, when recently
adding this benchmark to the CI it showed it as a regression. Therefore
some implicit compiler optimizations are now explicit, which allows the
block-based sketch to match or exceed the flat-based performance.

- We no longer rely on escape analysis to optimize away the method
scoped arrays (count, index). These should have been stack allocated
and broken into their components.
- The arrays were meant to break a loop data dependency, but it is now
faster to keep that. `Math.min` is a single cycle, branch-free
instruction that the OOO pipeline seems to prefer.
- `increment` is manually loop unrolled like the flat version, which
shows a simiar speed up.
- Previously, the flat benchmark version implemented the scaffolding
interface directly, was pre-allocated, and the init guard was removed.
This gave it a large advantage as it improved inlining, branch
prediction, etc. The benchmark is now fair.
- For jdk11 the black is always faster by at least 10M ops/s. In jdk23
the speedup only occurs as the table size increases, matching the
expected gains from better cache effects. It is marginally slower on
the small table size due to indexing differences.

The net user effect will be noise since this was not a performance
bottleneck due to the cache's overall design.

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

2 existing lines in 2 files now uncovered.

7637 of 7711 relevant lines covered (99.04%)

0.99 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #4633.1 16 Nov 2024 10:17PM UTC 0
99.04
Source Files on build #4633
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #4633
  • 473ade62 on github
  • Prev Build on master
  • Next Build on v3.dev
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc