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

Parse_set / Parse_choice shrinking #1440

Merged
merged 5 commits into from
Feb 20, 2023
Merged

Parse_set / Parse_choice shrinking #1440

merged 5 commits into from
Feb 20, 2023

Conversation

ampli
Copy link
Member

@ampli ampli commented Feb 19, 2023

(See PR #1419.)

  1. Save 8 bytes in each.
  2. On the same occasion add Parse_set::num_pc in unused space in Parse_set to save repeated counting in list_random_links().
  3. Fix a bit rot in DEBUG_X_TABLE.

In principle, it is possible to calculate and cache num_pc in do_count() and then eliminate Parse_coice::next and simplify link extraction (no need to scan a list). There is a missing infrastructure for that in do_coutn() but I may add it (to speed up parsing with nulls). In any case, the overhead of this num_pc caching is unclear.

@linas linas merged commit 8a290fd into opencog:master Feb 20, 2023
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