Skip to content

Low Budget Hash Map#432

Merged
JeanPhilippeKernel merged 9 commits intoJeanPhilippeKernel:arena-integrationfrom
jnyfah:containers
Apr 6, 2025
Merged

Low Budget Hash Map#432
JeanPhilippeKernel merged 9 commits intoJeanPhilippeKernel:arena-integrationfrom
jnyfah:containers

Conversation

@jnyfah
Copy link
Copy Markdown
Collaborator

@jnyfah jnyfah commented Mar 25, 2025

This will need to be revisited in the nearest future as dynamic growth means rehashing the entire hashmap again (hopefully for now that doesn't happen too often as the size doubles and the user also specifies capacity upfront)

Also removed size initialization from array init

Added initializer list

@jnyfah jnyfah marked this pull request as ready for review March 25, 2025 21:52
Comment thread ZEngine/tests/initializerlist_test.cpp Outdated
Comment on lines +28 to +33
array.init(&arena, 4);
array.push(1);
array.push(2);
array.push(3);
array.push(4);

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'd expect the initializer_list to be used for this particular case:
e.g
cpp Array<int> array; array.init(&arena, 4, {1, 2, 3, 4})

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The issue is that {1, 2, 3, 4} syntax is special in C++ - it's directly tied to std::initializer_list but i can have a make_initializer_list variadic function as a helper

Comment thread ZEngine/tests/initializerlist_test.cpp Outdated
Comment on lines +51 to +55
Array<String> str_array;
str_array.init(&arena, 3);
str_array.push(String());
str_array.push(String());
str_array.push(String());
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 comment about the expectation above

Comment thread ZEngine/tests/hashmap_test.cpp
Comment thread ZEngine/ZEngine/Core/Containers/HashMap.h
@JeanPhilippeKernel JeanPhilippeKernel added area-window Work on Window system area-macOS Work on macOS system labels Apr 6, 2025
@JeanPhilippeKernel JeanPhilippeKernel merged commit c8863dd into JeanPhilippeKernel:arena-integration Apr 6, 2025
17 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in ZEngine Board Apr 6, 2025
@jnyfah jnyfah deleted the containers branch April 15, 2025 11:31
JeanPhilippeKernel added a commit that referenced this pull request Apr 21, 2025
* basic arena allocator (#425)

* basic arena allocator

* added resize impl

* edit resize

---------

Co-authored-by: jnyfah <jnyfaah@gmail.com>

* Introducing Memory Manager (#426)

* basic arena allocator

* added resize impl

* edit resize

* added memory manager

* updated CI

* fixed format

* fixed naming

* assert PoolAllocator memory

---------

Co-authored-by: jnyfah <jnyfaah@gmail.com>

* added support of cmd parser (#427) (#428)

* Containers (#429)

* vector and string view draft

* string

* minor changes

* container rewrite

* again

* more changes

* more changes again

* Moving Editor to Arena (#430)

* initial move to arena

* initial editor move to arena alloc

* More update around the editor (#431)

* initial move to arena

* initial editor move to arena alloc

* more arena for importers and serializers

* cleanup around the editor

* fixed scene name

* format

* improved importers and serializers concurrency

* Low Budget Hash Map (#432)

* hash map????

* because format is my worst enemy

* removing size from array initialization because i dont see the point of it

* adding some string to hashmap test because why not

* added initializer list and some tests for arrayview

* some changes

* make lists??

* clang format hates me

* remove silly comments

* first iteration - engine runs on Arena (#433)

* first iteration - engine runs on Arena

* fixed input devices

* fixed logger configuration logic

* fixed vma mem leaks

* deleted stale memory  in Handle manager pool

* fixed handle tests

* more removal of vector

* clang format

* I broke the pipeline

---------

Co-authored-by: Jennifer Chukwu <jnyfaah@gmail.com>

* More removal of std containers (#435)

* removed std containers

* rewrote the hashmap using linear probing

* clang format hates to see me coming lol

* more improvement

* more improve around shader caches

* deleted dead codes

* improved corewindows requiredlayers

---------

Co-authored-by: jnyfah <jnyfaah@gmail.com>

* Fixing import model and serialization logic (#442)

* fixed import models

* fixed platform backslash

* Math Library (#440)

* vec again

* some major changes

* clang format

* added header

* from vector to vec

* some changes

* some changes again

* last one

---------

Co-authored-by: jnyfah <jnyfaah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants