B trees vs binary trees

后端 未结 2 1492
伪装坚强ぢ
伪装坚强ぢ 2021-01-30 13:36

If I am implementing in-memory(RAM) search operation with b trees, then would it be better in terms of caching or some other effects when compared with binary trees?

What

2条回答
  •  故里飘歌
    2021-01-30 13:47

    B-trees differ from binary trees in that keys and pointers are clustered in memory, so you get somewhat better cache behavior both on disk and in memory. There is no difference in asymptotic (big-O) runtime, though.

提交回复
热议问题