Skip to content

AVL self-balancing tree written in pure Julia.

License

Notifications You must be signed in to change notification settings

goerch/AVLTrees.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 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. Times are shown for an average of 1000 operations made at N elements in the structure.

Table

 Row │ n         insert[us]   delete[us]    search[us]
     │ Any       Float64?     Float64?      Float64?  
─────┼────────────────────────────────────────────────
   11000          152.67        32.02    0.00222892
   210000         174.1         63.86    0.00227912
   3100000        299.6        165.86    0.00235597
   41000000       629.11       524.92    0.00304124
   510000000      964.76       912.39    0.025

Plot

benchmark results

About

AVL self-balancing tree written in pure Julia.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%