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

implement a faster sort #803

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

godofdream
Copy link
Contributor

using unstable_sort without allocating a copy of the object.
it checks if the pointer (json path) is available for each entry, and if the type (string,array,number) is identical.
Additionally the errormessage is more detailed.

I didn't benchmark yet.

Ok(())
})
.collect();
misfits?;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to put ? after the collect.

return Ok(a.cmp(&b));
}
}
Err(Error::msg(format!("{a} cannot be sorted")))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely going to error on the MSRV

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 this pull request may close these issues.

2 participants