Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ None is returned, if the key is not present in the tree.

# Contribute
The AVL tree itself is implemented in `avl_tree.rs`. The other modules and files contain helpers for testing.
```rustup target add wasm32-unknown-unknown```
```
rustup target add wasm32-unknown-unknown
```

# Performance
The performance evaluation of our AVL tree implementation confirms that its efficiency aligns with theoretical expectations, scaling logarithmically in O(log<sub>2</sub>(n)) with respect to the number of elements n.
This scaling behavior is illustrated in our test results, where the empirical performance data closely matches the fitted
log<sub>2</sub> curve depicted in red. Furthermore, the tests reveal that the operation costs remain minimal even with high amounts of elements. For example, for inserting an element in a tree with 100Mio elements only around 0.24 are needed. With the extrapolation in the plotted line we can calculate that the tree reaches the hard limit of 5 XRD at 10<sup>166</sup> elements.
So, the cost for inserting and deleting (similar time needed) elements from the avltree should not lead to breaking of that limit, because so many elements are not feasible to even think about putting into the data structure.
![](plot.png)
8 changes: 7 additions & 1 deletion integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ scrypto_avltree = { path = ".." }
[dev-dependencies]
transaction = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.1.1" }
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.1.1" }
scrypto_testenv = { git = "https://github.com/ociswap/scrypto-testenv", tag = "v0.6.1" }
scrypto_testenv = { git = "https://github.com/ociswap/scrypto-testenv", branch = "lock_fee_from_faucet", version = "0.6.1" }
# scrypto_testenv = { path = "../../scrypto-testenv" }
lazy_static = "1.4.0"
rand = "0.8.5"
csv = "1.3.0"
log = "0.4.20"
log4rs = "1.3.0"
test-log = "0.2.14"
radix-engine-macros = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "v1.1.1" }

[profile.dev]
opt-level = 'z' # Optimize for size.
Expand Down
Empty file.
Loading