facebook / facebook/folly

Implement free reset on SparseByteSet + parametrize with size.

Open
#1,787 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

1. [Here](https://github.com/facebook/folly/blob/main/folly/container/SparseByteSet.h) we can make free reset of all data structure with this simple method:

`void reset() { size_ = 0; }`

Why this class insert-only now?

2. Arrays size is defined as internal constexpr variable. We make this class more useful if user can parametrize it with size. We also can deduce needed types for `size_` and arrays from size on compile time.

Contributor guide

Open the contributing guide

Research direction

Read folly/container/SparseByteSet.h first, focusing on the current reset behavior, the internal constexpr array size, size_, and the existing insert-only design. Define what a parameterized size should mean for the class and how the related types derive from it at compile time. Done means the data structure supports free reset and user-selected size without breaking its existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.