[fpc-pascal] Hello,I suggest that you change the TFPGMap in fgl.

김봄 springnode at gmail.com
Sat Jul 16 22:57:18 CEST 2016


if TFPGMap::Sorted is True, then Add method time complexity is O(n) and
Indexof,Find method is O(lg n).

or Sorted is False, then Add method is O(1) and Indexof,Find is O(n)

but, most language's map implementation is red/black tree or hashtable.

i don't know why free pascal's map is based on array.

if map implementation is hashtable or r/b tree, then Add,Indexof,Find
method have a
log or constant time complexity.

please, answer my suggestion.

sorry for my english.

sincerely.

==

yonsei univ. in korea, kimbom.

ᐧ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160717/5592baca/attachment.html>


More information about the fpc-pascal mailing list