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

Comparision with Hackel Diff algo #51

Open
kandelvijaya opened this issue Jan 27, 2019 · 4 comments
Open

Comparision with Hackel Diff algo #51

kandelvijaya opened this issue Jan 27, 2019 · 4 comments
Labels

Comments

@kandelvijaya
Copy link

kandelvijaya commented Jan 27, 2019

Thanks for contributing to the swift community.

As an author of my own implementation of Diff based on Heckel's algorithm I wanted to know if you did try the comparision with implementation based on Heckel's algo?

Im working on this www.github.com/kandelvijaya/fastdiff while there are few others around. The next immediate one is DeepDiff (should be).

@tonyarnold
Copy link
Owner

You'd really have to ask @wokalski - he put together the original implementation, and I wouldn't want to speak on his behalf.

@wokalski
Copy link

wokalski commented Jan 28, 2019

@kandelvijaya the different diff algorithms have different outputs and it'd be nice to make a comparison so that people can use one or another. It'd be even nicer to make all of them conform to the same protocol so that you (as a user) could just switch the underlying implementation with a few lines.

EDIT: I haven't made one though

@kandelvijaya
Copy link
Author

kandelvijaya commented Feb 3, 2019

@wokalski that is very nice idea indeed. The interesting problem with the same client protocol. Im not sure how to capture various algorithm dependent interfaces. For instance, in my case, i let the client override diffHash which by default is hashValue to get internal diff (update).

I believe a good start would be a general protocol that captures the 90% use case.

func diff<T>(_ old: T, new: T) -> ChangeSet<T.Element> where T: Collection, T.Element: Hashable 

P.S. This is just a idea.

@wokalski
Copy link

wokalski commented Feb 3, 2019

yes, @kandelvijaya. I'm not using swift anymore but capturing 90% of cases first always makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants