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

Improve the CPU and memory efficiency of the match-list cache #1460

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

ampli
Copy link
Member

@ampli ampli commented Mar 2, 2023

This patch simplifies the match-list cache code and saves 8 bytes per "word vector" element that doesn't have a count.
It also uses a single memory pool for the cache (instead of two).

@linas linas merged commit 038b8ab into opencog:master Mar 2, 2023
@linas
Copy link
Member

linas commented Mar 2, 2023

Cool!

@linas
Copy link
Member

linas commented Mar 2, 2023

BTW, if you are doing other refactoring, and it looks like there is a blob of stand-alone code that it relatively unrelated to anything else, please move it to it's own file.

The problem I'm having is that several of the existing c files are quite large, and have multiple "almost unrelated" subsystems in them. This makings reading and understanding the code harder, because its not clear where one subsystem stops, and the next one starts. I'm aiming for 500 lines-of-code or less, rule-of-thumb, for file sizes.

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