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

[Cache] Using strpbrk() instead of strcspn() is faster#21269

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
nicolas-grekas merged 1 commit intosymfony:3.1fromnicolas-grekas:cache-strpbrk
Jan 13, 2017

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?3.1
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Keys validation using strpbrk is faster.
Eg on some micro bench:

  • isset($a[strcspn($a, '{}()/\@:')]): 278ms
  • false !== strpbrk($a, '{}()/\@:'): 183ms

@nicolas-grekasnicolas-grekas added this to the3.1 milestoneJan 13, 2017
@javiereguiluz
Copy link
Member

👍

Status: reviewed

@nicolas-grekasnicolas-grekas merged commitd68c451 intosymfony:3.1Jan 13, 2017
nicolas-grekas added a commit that referenced this pull requestJan 13, 2017
…colas-grekas)This PR was merged into the 3.1 branch.Discussion----------[Cache] Using strpbrk() instead of strcspn() is faster| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Keys validation using strpbrk is faster.Eg on some micro bench:- `isset($a[strcspn($a, '{}()/\@:')])`: 278ms- `false !== strpbrk($a, '{}()/\@:')`: 183msCommits-------d68c451 [Cache] Using strpbrk() instead of strcspn() is faster
@nicolas-grekasnicolas-grekas deleted the cache-strpbrk branchJanuary 13, 2017 10:10
@fabpotfabpot mentioned this pull requestJan 28, 2017
@fabpotfabpot mentioned this pull requestFeb 6, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.1

Development

Successfully merging this pull request may close these issues.

3 participants

@nicolas-grekas@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp