-
Notifications
You must be signed in to change notification settings - Fork 49
FEATURE: Add CompletableFuture BTree insert/get API #1026
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
base: develop
Are you sure you want to change the base?
Conversation
a07510d to
91630d5
Compare
uhm0311
left a comment
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.
μ°μ μ§λ¬Έμ λλ€.
|
@uhm0311 @brido4125 λ¦¬λ·°κ° μ§νλμ΄μΌ ν©λλ€. |
|
#1026 (comment) |
91630d5 to
310caa8
Compare
uhm0311
left a comment
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.
ν λ² λ μ§λ¬Έμ λλ€.
| this.trimmedKeys = trimmedKeys; | ||
| } | ||
|
|
||
| public static <T> SMGetResult<T> mergeSMGetResults(List<SMGetResult<T>> results) { |
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.
κΈ°μ‘΄ SMGetResult ν΄λμ€μμ mergeνλ λ‘μ§κ³Ό λ¬λΌμ‘μ΅λλ€.
λ¨μννκΈ°λ‘ κ²°μ λ 건κ°μ?
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.
μ λ ¬λ μ¬λ¬ 리μ€νΈλ₯Ό νλμ μ λ ¬λ 리μ€νΈλ‘ λ³ν©ν λ μ ν©ν K-way merge λ°©μμΌλ‘ ꡬνν΄λ³΄μμΌλ, Collections.sort λ°©μμ΄ λ²€μΉλ§ν¬νμ λ λ λΉ λ₯΄κΈ° λλ¬Έμ μ΄μ κ°μ΄ μμ νμμ΅λλ€.
λ²€μΉλ§ν¬ μ μ¬μ©ν k-way merge ꡬν μ½λμ ν μ€νΈ μ½λλ λ§ν¬ μ°Έκ³ λΆνλ립λλ€.
λ²€μΉλ§ν¬ ν μ€νΈ κ²°κ³Ό
======================================================================
SMGetResult Merge Algorithm Benchmark
Comparing k-way merge vs Collections.sort
======================================================================
=== Small Dataset ===
Nodes: 5
Elements per node: 100
Total elements: 500
Iterations: 1000
Results:
K-way merge: 39 ms (0.04 ms/iteration)
Collections.sort: 12 ms (0.01 ms/iteration)
Speedup: 0.31x
β Old implementation is faster
=== Medium Dataset ===
Nodes: 10
Elements per node: 500
Total elements: 5000
Iterations: 100
Results:
K-way merge: 39 ms (0.39 ms/iteration)
Collections.sort: 7 ms (0.07 ms/iteration)
Speedup: 0.18x
β Old implementation is faster
=== Large Dataset ===
Nodes: 20
Elements per node: 1000
Total elements: 20000
Iterations: 50
Results:
K-way merge: 94 ms (1.88 ms/iteration)
Collections.sort: 13 ms (0.26 ms/iteration)
Speedup: 0.14x
β Old implementation is faster
=== Very Large Dataset ===
Nodes: 50
Elements per node: 2000
Total elements: 100000
Iterations: 10
Results:
K-way merge: 123 ms (12.30 ms/iteration)
Collections.sort: 13 ms (1.30 ms/iteration)
Speedup: 0.11x
β Old implementation is faster
=== Many Nodes ===
Nodes: 500
Elements per node: 100
Total elements: 50000
Iterations: 50
Results:
K-way merge: 497 ms (9.94 ms/iteration)
Collections.sort: 41 ms (0.82 ms/iteration)
Speedup: 0.08x
β Old implementation is faster
=== Few Nodes Large Elements ===
Nodes: 3
Elements per node: 5000
Total elements: 15000
Iterations: 50
Results:
K-way merge: 24 ms (0.48 ms/iteration)
Collections.sort: 5 ms (0.10 ms/iteration)
Speedup: 0.21x
β Old implementation is faster
======================================================================
Benchmark Complete
======================================================================
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.
κΈ°μ‘΄ λ‘μ§μ unique μ¬λΆ, reverse μ¬λΆ, count κ°μ λ°λΌ κ²°κ³Όκ° λ¬λΌμ§λ λ‘μ§μ΄μμ΅λλ€.
μ€λ³΅λ bkeyλ μ κ±°νκ³ , reverseμ΄λ©΄ μμμΌλ‘ μ λ ¬νκ³ , countλ³΄λ€ λ§μ μμλ λ°νλμ§ μμμ΅λλ€.
νμ¬ PRμ κΈ°μ‘΄ λ‘μ§κ³Ό λ¬λ¦¬ κ·Έλ₯ λͺ¨λ κ²°κ³Όλ₯Ό λ€ ν¬ν¨νκ³ μλλ°, μμ κ°μ λ‘μ§λ€μ λ¨μννκΈ°λ‘ κ²°μ ν κ²μΈμ§ κΆκΈν©λλ€.
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.
μ μ΄λΆλΆμ μ κ° λμ³€μ΅λλ€.
countμ κ²½μ°λ bopMultiGetμμλ SMGetκ³Ό λμΌνκ² bkey μ λ ¬ μμλλ‘ μλΌμ λ°νν΄μΌ ν κ² κ°μλ° μ΄λ»κ² μκ°νμλμ? (μΌκ΄λ μλ―Έλ₯Ό κ°μ ΈμΌ νλ€λ μκ°μ
λλ€.)
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.
bopMultiGetμ κ²½μ° μλ² λ¨μμ μ΄λ―Έ countμ λ§μΆ°μ λ°ννμΌλ λ¬Έμ μμ΅λλ€.
smget μ°μ°μμ λ¬Έμ κ° λλ λΆλΆμ, κ° μΊμ μλ² λ¨μμλ countμ λ§μΆ°μ λ°νμ νμ§λ§ μ΄λ₯Ό Clientμμ λ³ν©νλ κ³Όμ μμ count κ°μλ₯Ό μ΄κ³Όν κ°λ₯μ±μ΄ μλ λΆλΆμ
λλ€.
μλ₯Ό λ€μ΄ count κ°μ΄ 50μΈλ° μΊμ μλ² 2λμμ λ λ€ 50κ°μ μμλ₯Ό λ°ννλ€λ©΄, Client μ
μ₯μμλ 100κ°μ μμλ₯Ό λ°μ κ²μ
λλ€.
κ·Έλμ κΈ°μ‘΄ smgetμμλ countλ³΄λ€ λ§μ μμλ₯Ό λ²λ¦¬λ λμμ΄ μμλ κ²μ
λλ€.
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.
btree api PRμ μ 체μ μΌλ‘ μλμ κ°μ μ€λͺ λ§λΆμ¬ μ£ΌμΈμ
- as-is μνμμμ λ°νκ° / to-be μνμμμ λ°νκ°
- as-is μνμμμ μμΈ μ λ°ν κ° / to-be μνμμμ μμΈ μ λ°νκ°
μ λΆλΆμ΄ λμ€μ ν΄λΉ κΈ°λ₯ λ¦΄λ¦¬μ¦ ν λ, μ΄μ°¨νΌ μ¬μ©μμκ²λ κ°μ΄λ λμ΄μΌ ν λ΄μ©μ
λλ€.
λ²κ±°λ‘λλΌλ μ§κΈ 미리 μμ±νλ€κ³ μκ°νκ³ ν΄μ£Όμλ©΄ κ°μ¬νκ² μ΅λλ€
310caa8 to
67103e8
Compare
|
@brido4125 |
π Related Issue
β¨οΈ What I did
Transcoder<Object>νμ μ κ°μ ΈμTranscoder<T>νμ μΌλ‘ νλ³νν©λλ€.