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 method for efficient key lookup in Dict implementation #341

Open
coderabbitai bot opened this issue Nov 15, 2024 · 1 comment
Open

Optimize method for efficient key lookup in Dict implementation #341

coderabbitai bot opened this issue Nov 15, 2024 · 1 comment

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: axone-protocol#17

Comment URL: axone-protocol#17 (comment)

@ccamel
Copy link
Contributor

ccamel commented Nov 15, 2024

@ichiban Oops, looks like this issue was accidentally created by Coderabbit on this repo instead of mine (which is a fork). Not sure why that happened—guess the bots are starting to make their own decisions now! 😅 Feel free to close the issue. Sorry for the hassle! 🙏

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