Skip to content

Less Heap Usage in Hashtable #57701

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

Merged
merged 16 commits into from
Mar 5, 2024
Merged

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Mar 1, 2024

No description provided.

@WillAyd WillAyd added the Clean label Mar 1, 2024
@@ -644,15 +628,13 @@ cdef class {{name}}HashTable(HashTable):
int ret = 0
{{c_type}} val, na_value2
khiter_t k
{{name}}VectorData *ud
Copy link
Member Author

Choose a reason for hiding this comment

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

Something very strange was going on here, where changing this to a non-pointer and assigning ud = uniques.data then trying to pass that via reference to needs_resize was failing. I think has something to do with Cython pointer/reference semantics, but rather than dive too deep figured it was trivial enough to just remove

@WillAyd WillAyd changed the title Hashtable cleanups Less Heap Usage in Hashtable Mar 2, 2024
@mroeschke mroeschke added this to the 3.0 milestone Mar 5, 2024
@mroeschke mroeschke merged commit 0c9a66b into pandas-dev:main Mar 5, 2024
@mroeschke
Copy link
Member

Thanks @WillAyd

@WillAyd WillAyd deleted the remove-hash-heap-alloc branch March 12, 2024 02:31
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Hashtable cleanups

* Remove unused imports

* renamed .n -> size, .m -> capacity

* size_t -> Py_ssize_t

* revert needs_resize

* remove unnecessary pointers

* fix build issues

* Removed ud variable

* Fix ObjectVector issue

* try setting NULL in dealloc

* reset things

* try smaller scope

* Smaller scope

* less change

* remove unused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants