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

Optimization: Fast List Traversal #333

Closed
nielstron opened this issue Feb 7, 2024 · 2 comments
Closed

Optimization: Fast List Traversal #333

nielstron opened this issue Feb 7, 2024 · 2 comments
Labels
bb: medium Medium issue according to bug bounty categorization bug bounty This issue is prized out as part of the Bug Bounty Program enhancement New feature or request

Comments

@nielstron
Copy link
Contributor

nielstron commented Feb 7, 2024

Is your feature request related to a problem? Please describe.
List accesses in uplc are linear in n. While you can not reduce the number of tailList operations, you can reduce the number of index comparisons to reduce the cost of execution.

Describe the solution you'd like
A similar to solution to list_at_index could be implemented in the opshin implementation of list[x]. The step size could be configurable but likely 5 is a good heuristic for most data that is on-chain.

Describe alternatives you've considered
None

Additional context
This could go together with #168 in one of the higher optimization levels.

Bug bounty: 2000 ADA

@nielstron nielstron added the enhancement New feature or request label Feb 7, 2024
@nielstron nielstron added bug bounty This issue is prized out as part of the Bug Bounty Program bb: medium Medium issue according to bug bounty categorization labels Apr 7, 2024
@nielstron
Copy link
Contributor Author

Claiming this bounty

@nielstron
Copy link
Contributor Author

Resolved in #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bb: medium Medium issue according to bug bounty categorization bug bounty This issue is prized out as part of the Bug Bounty Program enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant