On Fri, Jul 10, 2020 at 1:53 PM Chris Angelico <ros...@gmail.com> wrote: > > > And immediately above that part, I said that I had made use of this, > and had used it in Python by listifying the dict first. Okay, so I > didn't actually dig up the code where I'd done this, but that's a use > case. I have *actually done this*. In both languages. >
Do you pick random item repeatedly from same dictionary? If so, you can create a list once in Python. Or do you pick random item from various dictionaries? If so, you application must create many dictionaries, not only picking random item. Unless randam picking part is the bottleneck, micro optimization for this part is not important. That's why the higher level use case is needed to design useful benchmark. Regards, -- Inada Naoki <songofaca...@gmail.com> _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TWCTMD4O2LQ2FATD6BG2BX4VEZPFZWNX/ Code of Conduct: http://python.org/psf/codeofconduct/