Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

update to latest memchr + upgrade to Rust 2018 + bump MSRV to Rust 1.41#767

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BurntSushi merged 6 commits intomasterfromag/rust-2018-memmem
May 1, 2021

Conversation

@BurntSushi
Copy link
Member

The main motivation for this PR is to use the new memmem implementation inmemchr 2.4 (not quite released at time of writing, butin a PR). This let's us delete regex's own bespoke substring search implementations ("FreqyPacked" along with Boyer-Moore). The main benefit of the new implementation is that it should roughly maintain the speed of the old algorithms, but keep its speed in a lot more cases. i.e., It should have far fewer weaknesses. Plus, the algorithm is now available for anyone to use without bringing inregex.

While we're here, we (finally) move to Rust 2018 and bump the MSRV to Rust 1.41 (since that's what's in Debian Stable). There's no particular reason why I waited so long to do this. It was never my intent to support such an old version of Rust for so long. There was just never a strong impetus to upgrade. But with Rust 2021 around the bend, it seems appropriate to at least migrate to Rust 2018. Hopefully we'll get to Rust 2021 sooner.

(The plan is to merge this PR once I do a similar change to theaho-corasick crate.)

pickfire reacted with eyes emoji
BurntSushi added a commit to BurntSushi/aho-corasick that referenced this pull requestApr 30, 2021
This is in line with similar changes to the regex and memchr crates:BurntSushi/memchr#82andrust-lang/regex#767
BurntSushi added a commit to BurntSushi/aho-corasick that referenced this pull requestApr 30, 2021
This is in line with similar changes to the regex and memchr crates:BurntSushi/memchr#82andrust-lang/regex#767
This removes the ad hoc FreqyPacked searcher and the implementation ofBoyer-Moore, and replaces it with a new implementation of memmem in thememchr crate. (Introduced in memchr 2.4.) Since memchr 2.4 also moves toRust 2018, we'll do the same in subsequent commits. (Finally.)The benchmarks look about as expected. Latency on some of the smallerbenchmarks has worsened slightly by a nanosecond or two. The topthroughput speed has also decreased, and some other benchmarks(especially ones with frequent literal matches) have improveddramatically.
This commit does a number of manual fixups to the code after theprevious two commits were done via 'cargo fix' automatically.Actually, this contains more 'cargo fix' annotations, since I hadforgotten to add 'edition = "2018"' to all sub-crates.
This was long overdue, and we were motivated by memchr's move to Rust2018 inBurntSushi/memchr#82.Rust 1.41.1 was selected because it's the current version of Rust inDebian Stable. It also feels old enough to assure wide support.
It looks like 'cargo fix' didn't do this.
@BurntSushiBurntSushi merged commita2a393f intomasterMay 1, 2021
@BurntSushiBurntSushi deleted the ag/rust-2018-memmem branchMay 1, 2021 00:04
@BurntSushi
Copy link
MemberAuthor

This PR is on crates.io inregex 1.5.0.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@BurntSushi

[8]ページ先頭

©2009-2025 Movatter.jp