algorithm - When is a Binary Tree better than a B-Tree? -


when storing binary tree or b-tree on secondary storage device such disk or tape, binary tree ever have advantage on b-tree?

i asked on assignment "when b-trees have advantage on binary trees?"

what have come b-tree better because requires less frequent disk access (reads more data per node access), , jumps less nodes final node. way question worded, implies there point binary tree have advantage on b-tree. so, is there point when binary tree better (more efficient) b-tree when stored on secondary storage?

it not correct compare sorted tree (b-tree) , simple binary tree, not equal. suppose mean binary search tree.

b-tree designed efficient when data stored on relatively slow storage. example when load or save data file system cluster size 4kb doesn't matter how of data in range 0..4kb need, take same time read 1 byte or 4kb , take time. b-tree keeps in mind fact , use it. in normal/general usage scenarios more efficient use b-tree (from point of view used space , performance).


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -