Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Didn't TCL not get constant-time array lookup until like version 8?


It's had "lists" (arrays) since... forever, as well as "arrays" (hash tables).

Also appearing in version 8.1 (in 1999) were Unicode and good support for threads, stuff that systems like Ruby only got recently.


Yes, but iirc array lookup was not constant time.


Hash lookup is constant time. The constant is merely higher than for a multiplication-and-addition-based vector lookup.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: