Vectorized `bitset::to_string()` remove `_Load_constant()` trick

Open
#6,473 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp

Research direction

Start in stl/src/vector_algorithms.cpp around lines 12125–12126 and trace the _Load_constant() implementations used by vectorized bitset::to_string(). Inspect the generated code and run the relevant benchmark to verify whether literal-constructed vectors preserve the improved compiler behavior. Done means the workaround and its implementations are safely removable without a code-generation or performance regression.

Written by the indexing model from the issue text.

Description

enhancement

There's DevCom-11056873 workaround

https://github.com/microsoft/STL/blob/94aef91ebec9e6e3fd9302840e657b09e536d90d/stl/src/vector_algorithms.cpp#L12125-L12126

The compiler issue has been fixed.

The call to _Load_constant() and each its implementation can probably be safely replaced with vectors constructed from literals.

But need to inspect codegen and/or run the benchmark to see if it is really fixed.

Dominant language
C++
Stars
11.2k
Forks
1.7k
Avg merge
4d 4h
Merged PRs (30d)
14

Getting set up

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 microsoft/STL

All issues in microsoft/STL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.