Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.21 KB

README.md

File metadata and controls

58 lines (46 loc) · 1.21 KB

Immutable red-black tree

Build Status

Deleting from Okasaki's red-black trees

See http://matt.might.net/articles/red-black-delete/ for explanation of the algorithm.

Performance

C:\ [master +0 ~1 -0]> .\RBTree.Console.exe
rb  insert: 4000
rb2  insert: 4906
set insert: 4899
fset insert: 4766
immset insert: 5424

rb  contains: 623
rb2  contains: 694
set  contains: 590
fset  contains: 728
immset  contains: 688

rb  remove: 4549
rb2  remove: 4644
set  remove: 4383
fset  remove: 3680
immset  remove: 4432

Same run on a MacBook Pro

rb  insert: 2931
rb2  insert: 3555
set insert: 4646
fset insert: 3808
immset insert: 6486

rb  contains: 575
rb2  contains: 683
set  contains: 719
fset  contains: 586
immset  contains: 763

rb  remove: 3626
rb2  remove: 3851
set  remove: 4745
fset  remove: 3329
immset  remove: 5717