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

Potential ways to optimize width_dimensions() algorithm #5

Closed
ArniDagur opened this issue Aug 3, 2018 · 0 comments · Fixed by #7
Closed

Potential ways to optimize width_dimensions() algorithm #5

ArniDagur opened this issue Aug 3, 2018 · 0 comments · Fixed by #7

Comments

@ArniDagur
Copy link
Contributor

ArniDagur commented Aug 3, 2018

See the following commit in my (rather poor) Python implementation of this algorithm: ArniDagur/guide-key.nvim@fbd9b5e

As you can see, I tried both binary search and looping downwards from the theoretical maximum number of lines, to 1. Both seemed to improve performance, but there are almost certainly better ways to go about it.

I thought about basing binary search hi/lows off of the theoretical maximum number of lines, but the problem there is that I'm not sure how to efficiently calculate the theoretical minimum. This occurs when the items are sorted from highest to lowest (or the other way around).

@ogham I would love to hear your ideas and thoughts.

ArniDagur added a commit to ArniDagur/rust-term-grid that referenced this issue Oct 27, 2018
I have yet to test if this actually improves performance in Rust. If it
does, this commit should close ogham#5.
@ogham ogham closed this as completed in #7 Mar 15, 2019
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

Successfully merging a pull request may close this issue.

1 participant