Skip to content
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

Reduce the size of the string set #1488

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Conversation

linas
Copy link
Member

@linas linas commented Apr 16, 2024

After recent fixes, it seems that the size of the string set can be reduced.

@linas linas merged commit 1bc4ee0 into opencog:master Apr 16, 2024
1 check passed
@linas linas deleted the smaller-string-set branch April 16, 2024 17:54
@linas
Copy link
Member Author

linas commented Apr 16, 2024

@ampli if you think this is wrong, let me know. It seemed like the right thing to do.

@ampli
Copy link
Member

ampli commented Apr 16, 2024

The recent fixes were in tracon-set.
When I last revised the string-set code, I benchmarked it using the English corpus batches and found that 3/8 is better than even 1/2. Since it doesn't take much memory, there is no need to save memory there. Also, if I succeed in my plan to significantly speed up the parsing, every CPU saving in the other parts of the library will have a bigger impact. (Regarding string-id, it only has very few items in all its current usages, so I assume its initial table size will not increase anyway. But even if it will have usages with many items - there is no need to save memory there.)

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