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

Optimize \Value\ method for efficient key lookup in Dict implementation #18

Open
coderabbitai bot opened this issue Nov 15, 2024 · 0 comments
Open
Assignees

Comments

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2024

As requested by @ccamel, this issue aims to improve the performance of the `Value` method in the `Dict` implementation within `engine/dict.go`. Currently, the `Value` method iterates over all key-value pairs, resulting in O(n) time complexity for key retrieval. The use of a list of terms for `Dict` representation was chosen to leverage Prolog’s pattern matching and unification capabilities through its compatibility with compound terms. However, there's room for enhancement in this approach to boost performance.

PR URL: #17

Comment URL: #17 (comment)

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

No branches or pull requests

1 participant