Quickest way to access items in Python dictionary

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 4

  • @iamwhoiam798
    @iamwhoiam798 2 месяца назад +1

    Blue & pink lines are roughly linear. Roughly at 70k, there could be some memory allocation or something else that has dropped the performance. More like a one time thing within each test above 70k. With this I tend to think that it's linear for normal hash reading ( blue & pink ).

  • @gardnmi
    @gardnmi 2 месяца назад

    I would assume the fastest way to access values is using dict.values() :)