Add prefetch to core

Open
#136 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

Start with boost/context/detail/prefetch.hpp from the linked Boost 1.81 source, then locate the corresponding Boost.Histogram implementation and current uses in context and fiber. Confirm how the existing copies are integrated before moving the shared implementation into Boost.Core. Done means context, fiber, and Histogram use the Core-provided prefetch command without duplicate implementations.

Written by the indexing model from the issue text.

Description

We are currently implementing a new algorithm in Boost.Histogram which is supposed to profit from cacheline prefetching. The prefetch instruction is a builtin, so we need code to get a platform-independent Boost command. I discovered that Boost.Context already has such an implementation in its details.

https://www.boost.org/doc/libs/1_81_0/boost/context/detail/prefetch.hpp

I propose to move this code to Core, so that all libraries can profit from prefetching. Currently, context and fiber use this code, and it is currently added to Boost.Histogram.

Dominant language
C++
Stars
156
Forks
116
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/core

All issues in boostorg/core

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.