📄 cltnarrays.pas
字号:
unit CltnArrays;
(*
Implement collections using arrays.
IList and IStack are obvious for array implementations, but ISet and IMap
can also work with arrays. TSortedList implements IList, but storing all
items in sorted order. TSortedArraySet and TSortedArrayMap use TSortedList
to implement ISet and IMap. It turns out a sorted array is only slightly
slower than TRbTree for many operation, and for collections that don't
change size much, an array uses less memory than hash tables and trees.
TArraySet and TArrayMap complete the suite, but are usuable only for
the tiniest of sets. For sets that contain just a few elements, though,
the lower overhead may indeed prove beneficial.
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -