Repository navigation
Docs: CS 공부 시리즈 2편 추가 (Big-O · React diffing) - #4
Merged
Merged
Conversation
이중 루프 중복 검사를 Set으로 바꾸며 O(n²)에서 O(n)으로 줄이는 과정 정리. Set을 통째로 만들었을 때 항상 true가 되는 함정과 Set.has가 O(1)인 근거 포함.
리스트 렌더링에서 key가 필요한 이유를 훑기와 짝짓기의 구분에서 출발해 정리. index를 key로 쓸 때 짝짓기가 밀리는 과정, props 속성 단위 비교, O(n³)를 O(n)으로 낮춘 두 휴리스틱, Fiber의 중단·재개 구조까지 다룸.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
무엇을
CS 공부시리즈로 포스트 2편을 추가했습니다. 시간복잡도에서 출발해 React 내부 동작까지 이어지는 한 흐름입니다.posts/cs/1-big-o-set-refactoring.mdx— 중복 검사 함수를 O(n²)에서 O(n)으로posts/cs/2-react-key-diffing-fiber.mdx— React는 왜 key를 요구할까 (diffing부터 Fiber까지)왜
기존 포스트는 대부분 트러블슈팅 기록인데, 이번 건은 학습 정리 성격이라 별도 시리즈(
series: "CS 공부")로 묶었습니다. 1편의 "O(1)로 조회하는 자료구조" 아이디어가 2편의 key 매칭으로 이어지도록 구성했습니다.리뷰어가 알면 좋은 것
파일 배치 — 시리즈 단위로 묶는 기존 방식(
posts/es6/,posts/2019/)을 따라posts/cs/에 번호 접두사로 두었습니다.날짜 — 두 편 모두 08-07 작성이지만, 목록 정렬이
date내림차순이라 같은 날짜면 순서가 파일 읽기 순서에 좌우됩니다. 시리즈가 갈라지지 않도록 시각으로 구분했습니다 (1편 09:00, 2편 10:00 KST). 표시 포맷이yy.MM.d라 화면에는 둘 다26.08.7로 나옵니다.썸네일 — 기존 썸네일과 같은 규격(798×533)·팔레트로 맞췄습니다.
검증
contentlayer2 build통과 (32개 문서, 기존 경고 7건 외 신규 없음)