[Python-Dev] Guarantee ordered dict literals in v3.7? (original) (raw)

Paul Sokolovsky pmiscml at gmail.com
Mon Nov 6 06:03:05 EST 2017


Hello,

On Mon, 6 Nov 2017 11:36:59 +0100 Stefan Krah <stefan at bytereef.org> wrote:

On Mon, Nov 06, 2017 at 12🔞17PM +0200, Paul Sokolovsky wrote: > MicroPython hashmap implementation is effectively O(n) (average and > worst case) due to the algorithm parameters chosen (like the load > factor of 1). Of course, parameters could be tweaked, but the ones > chosen are so because the memory usage is far more important for > MicroPython systems than performance characteristics (all due to > small amounts of memory). Like, MicroPython was twice as fast than > Python 3.3 on average, and 1000 times more efficient in the memory > usage.

[]

$ time ./micropython xxx.py $ time ../../cpython/python xxx.py

Congratulations ...

That's why I wrote "Python 3.3", it's hard to argue CPython doesn't do anything about the "Python is slow" proverb. It's still shouldn't be hard to construct a testcase where MicroPython is faster (by not implementing features not needed by 90% of Python programs of course, not "for free").

Anyway, where're memory measurements?

(This is offtopic, so I shouldn't have replied.)

Stefan Krah

-- Best regards, Paul mailto:pmiscml at gmail.com



More information about the Python-Dev mailing list