-
Notifications
You must be signed in to change notification settings - Fork 55
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
INTERNAL: Change DFS traverse order in set and map #815
Conversation
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.
coll_map.c
μ μλμ κ°μ ν¨μκ° μκ³ , do_set_elem_traverse_dfs()
μ μ μ¬ν ννλ₯Ό κ°κ³ μμ΅λλ€.
static int do_map_elem_traverse_dfs_bycnt(map_meta_info *info, map_hash_node *node,
const uint32_t count, const bool delete,
map_elem_item **elem_array, enum elem_delete_cause cause)
λμΌν λ³κ²½ μ μ©μ΄ νμνμ§ νμΈν΄μ€ μ μλμ?
mapλ κΈ°μ‘΄μ setκ³Ό λμΌν λ
Όλ¦¬λ‘ dfsλ₯Ό μ§ννκ³ μμ΅λλ€. |
κ°μ μ±κ²©μ λ³κ²½μ΄λ―λ‘, mapμ dfsμ λν΄μλ νλμ PRλ‘ μ²λ¦¬νλ©΄ μ’κ² μ΅λλ€. μ°Έκ³ μ¬νμΌλ‘, mapμ field λ¨μλ‘ μ‘°ννλ―λ‘ countκ°μ elementλ₯Ό μ‘°ννλ APIλ μμ§λ§, |
842b6af
to
69032a3
Compare
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.
commit messageμλ λ§μ§λ§μ and map
μΆκ°νλ©΄ μ’κ² μ΅λλ€.
69032a3
to
da71623
Compare
μΆκ°) commit authorμ jam2in μ κ±°ν΄ μ£ΌμΈμ. |
da71623
to
c71759e
Compare
} | ||
if (count > 0 && fcnt >= count) break; |
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.
μ§λ¬Έμ
λλ€.
node->hcnt[hidx] == 0
μΈ κ²½μ°μλ if λ¬Έμ₯μ΄ μνλκ² ν κ²μ΄ μλν κ²μ΄μ£ ?
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.
node->hcnt[hidx] == 0
μΈ κ²½μ°μλ if λ¬Έμ₯μ΄ μνλκ² ν κ²μ΄ μλν κ²μ΄μ£ ?
λ€. fnct
κ°μ΄ λ³ν΄μ break κ° μΌμ΄λλ κ²½μ°λ node->hcnt[hidx] > 0
λλ node->hcnt[hidx] == -1
μν©μμ μΌμ΄λκΈ° λλ¬Έμ node->hcnt[hidx] == 0
μΈ κ²½μ°μλ if λ¬Έμ΄ μ€νλμ΄λ λμ΄κ°λλ€.
π Related Issue
β¨οΈ What I did