Sujet : Re: Performance of list / array / dict compared
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tclDate : 18. Aug 2024, 18:05:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v9t9ka$2euft$3@dont-email.me>
References : 1 2 3
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
RodionGork <
rodiongork@github.com> wrote:
Python has the equivalent of Lists, Arrays, and Dictionaries -- which
did you use?
in Python the plain list is used (well, these details could be quickly
seen by the link to sources above) - as I mentioned in TCL I decided to
try other structures only because I thought list implementation could be
not very effective internally, e.g. due to historical reasons...
Your 'history' is 25 years out of date. Tcl's lists have been O(1)
complexity indexed arrays for that long (so long as you don't shimmer
them to/from strings on every usage).