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

Explore a cursor implementation that does not track offsets ("fast cursors") #691

Open
Xanewok opened this issue Dec 2, 2023 · 2 comments

Comments

@Xanewok
Copy link
Contributor

Xanewok commented Dec 2, 2023

fast cursors (no offsets)

There are use cases that need to analyze the CST without tracking offsets. This means they shouldn't pay the cost of maintaining these numbers as the cursor is running. One idea is to provide another node.create_*() API that creates a fast Cursor that can implement all same API, but won't track or provide offset values.

However, this is a nice-to-have feature, and we can put it aside for later if it will result in two divergent implementations.

Separated from #628

@Xanewok
Copy link
Contributor Author

Xanewok commented Mar 4, 2024

@AntonyBlakey @OmarTawfik I know we were on the fence with this one; do we still plan to implement this? I feel that this is more in the P3 area as it's exploratory and not tracking the offsets doesn't sound like that big of a win, considering the fact that we traverse the tree by jumping to different allocations when walking the tree and so incrementing the counters well within the cache probably doesn't cost us much relative to that.

@OmarTawfik
Copy link
Contributor

@Xanewok it is definetely a P2 (previously known as P3), but in any case, I think it is worth a quick test (once we have a perf harness) to validate these assumptions.

@Xanewok Xanewok removed their assignment May 17, 2024
@OmarTawfik OmarTawfik moved this to Todo in Slang - Backlog Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants