-
-
Notifications
You must be signed in to change notification settings - Fork 23
Low Budget Hash Map #432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Low Budget Hash Map #432
Conversation
array.init(&arena, 4); | ||
array.push(1); | ||
array.push(2); | ||
array.push(3); | ||
array.push(4); | ||
|
There was a problem hiding this comment.
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})
There was a problem hiding this comment.
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
Array<String> str_array; | ||
str_array.init(&arena, 3); | ||
str_array.push(String()); | ||
str_array.push(String()); | ||
str_array.push(String()); |
There was a problem hiding this comment.
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
c8863dd
into
JeanPhilippeKernel:arena-integration
* basic arena allocator (#425) * basic arena allocator * added resize impl * edit resize --------- Co-authored-by: jnyfah <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]>
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