Skip to content

addAssumeNotIn for faster add - #32

Open
PauSolerValades wants to merge 1 commit into
deckarep:mainfrom
PauSolerValades:addAssumeNotIn
Open

PauSolerValades wants to merge 1 commit into
deckarep:mainfrom
PauSolerValades:addAssumeNotIn

Conversation

@PauSolerValades

Copy link
Copy Markdown
Contributor

Hello! I propose to add this function as an dangerous alternative to a faster add. It does not return a bool as it does not check if the element was there or not. I needed this to maximize performance in ReleaseFast, as putNoClobber in debug asserts a lot (slower) but in release skips the checks to return the bool.

I am porting this from my another repo which i was trying to get as much performance as possible :)

@deckarep

deckarep commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Looks like we have conflicts on this PR. But also, I'm not yet sure if this API makes sense to have in this repo. I want this repo to be a generally performant but also straightforward by not having too many API methods.

If you are trying to squeeze every bit of performance out of it, it might be better to model your own Set data-structure precisely.

I'm still thinking about it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants