Skip to content

implement a faster sort#803

Open
godofdream wants to merge 1 commit intoKeats:masterfrom
godofdream:faster-sort
Open

implement a faster sort#803
godofdream wants to merge 1 commit intoKeats:masterfrom
godofdream:faster-sort

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