-
Notifications
You must be signed in to change notification settings - Fork 19
findFruitsEndWith 함수 구현 #1
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
Open
github-reviewee
wants to merge
1
commit into
ohgyun:master
Choose a base branch
from
github-reviewee:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정규식으로 비교하지 않고, String.prototype.lastIndexOf()로 비교해보면 어떨까요?
jsPerf에서 정규식과 lastIndexOf의 검색 성능을 테스트해보니,
크롬에서는 정규식이, IE에서는 lastIndexOf()가 조금 빠르네요.
비교 집단이 작아서 좀 더 테스트를 해보긴 해야겠습니다.
어디선가 정규식은 굳이 로컬 변수로 설정하지 않아도 내부적으로 캐시 처리를 한다는 아티클을 본 것 같은데,
잘못 본 것이었나 봅니다. 혹시나 해서 테스트해보니, 로컬 변수로 설정해둔 게 양쪽 브라우저에서 다 빠르군요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request가 들어온 커밋에 대해 위와 같은 방식으로 리뷰를 달아줍니다.
마크다운(markdown) 서식을 쓸 수 있어서 링크나 이미지 등도 쉽게 넣을 수 있습니다.