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

The current reconcile algorithm will be slow in theory #47

Closed
yisar opened this issue Aug 25, 2021 · 2 comments
Closed

The current reconcile algorithm will be slow in theory #47

yisar opened this issue Aug 25, 2021 · 2 comments

Comments

@yisar
Copy link

yisar commented Aug 25, 2021

Because it's O (N ^ 2).

Theoretically, it is much slower than other algorithms, and the use case in performance test is just a special case of its speed.

@ts-thomas
Copy link
Collaborator

That is not true. Basically the loop looks like:

for(x || (x = 0); x < max_end; x++){
    for(let y = x + 1; y < max_end; y++){
         // this isn't O (N ^ 2)
    }
}

Since y is starting from x this can't be O (N ^ 2)

@jonaszuberbuehler
Copy link

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

3 participants