Currently, despite rules_get_def() inserting rules into the rule hash table at the end:
// Memoize.
if (sum_rule != NULL)
insert_rule(&rule_strs, rule_copy, l_str, sum_rule);
the function get_rule() doesn't actually work. It does not correctly identify whether one RuleNode is equal to another, and therefore never returns a value from the hash table.
Fixing this will improve the performance of the function.
Currently, despite
rules_get_def()inserting rules into the rule hash table at the end:the function
get_rule()doesn't actually work. It does not correctly identify whether oneRuleNodeis equal to another, and therefore never returns a value from the hash table.Fixing this will improve the performance of the function.