Skip to content

HashMap and HashSet#512

Closed
jnyfah wants to merge 8 commits intoJeanPhilippeKernel:developfrom
jnyfah:containers
Closed

HashMap and HashSet#512
jnyfah wants to merge 8 commits intoJeanPhilippeKernel:developfrom
jnyfah:containers

Conversation

@jnyfah
Copy link
Copy Markdown
Collaborator

@jnyfah jnyfah commented Apr 5, 2026

@jnyfah jnyfah changed the title Containers HashMap and HashSet Apr 5, 2026
@jnyfah jnyfah marked this pull request as ready for review April 6, 2026 08:08
@JeanPhilippeKernel JeanPhilippeKernel added Feature request New feature area-linux Work on Linux system area-window Work on Window system area-macOS Work on macOS system critical labels Apr 7, 2026
@JeanPhilippeKernel JeanPhilippeKernel added this to the Born baby (0.2.0) milestone Apr 7, 2026
@JeanPhilippeKernel JeanPhilippeKernel moved this to In Progress in ZEngine Board Apr 7, 2026
@JeanPhilippeKernel JeanPhilippeKernel linked an issue Apr 7, 2026 that may be closed by this pull request
3 tasks
return;
}

Array<size_type> indices;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use scratch arena for temporary container like this

}

// Collect occupied slot indices into a scratch array.
Array<size_type> indices;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use scratch Arena

@@ -0,0 +1,456 @@
#pragma once
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole implementation can be simplified
if we base the HashSet on HashMap<K, bool>

@@ -0,0 +1,365 @@
#pragma once
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for UnorderedHashSet,

I think the whole implementation can be simplified if we base it on UnorderedHashMap<K, bool>

@jnyfah
Copy link
Copy Markdown
Collaborator Author

jnyfah commented Apr 9, 2026

@JeanPhilippeKernel closing this because i am too lazy to deal with the merge conflicts 🥲, will open another PR

@jnyfah jnyfah closed this Apr 9, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in ZEngine Board Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-linux Work on Linux system area-macOS Work on macOS system area-window Work on Window system critical Feature request New feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Implement more containers

2 participants