[go: nahoru, domu]

Skip to content

krynju/AVLTrees.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AVLTrees

Build Status codecov

AVL self-balancing tree written in pure Julia.

Implemented on raw heap assigned storage with minimal overhead coming from balancing the tree itself. The tree node structure only has an additional Int8 keeping the balance factor. All balancing procedures are dynamically propagated (no height calculations during balancing).

Benchmark

An overview of performance is shown below (Julia 1.6.3). Times in nanoseconds. Average of 100 operations performed at tree size n using Int64 keys and data.

Table

 Row │ n         insert    delete    search   
     │ Any       Float64?  Float64?  Float64? 
─────┼────────────────────────────────────────
   11000          18.0      19.0  0.182365
   210000         31.0      29.0  0.204204
   3100000        52.0      46.0  0.222668
   41000000       74.0      68.0  0.247743
   510000000     111.0      99.0  0.25502

Plot

benchmark results

benchmark results

About

AVL self-balancing tree written in pure Julia.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages