osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Have a big machine and spare time? Here's a possible Python bug.


Le ven. 24 mai 2019 ? 09:41, Inada Naoki <songofacandy at gmail.com> a ?crit :
> For the record, result for 10M nodes, Ubuntu 18.04 on AWS r5a.4xlarge:
>
> $ local/bin/python3 t1.py  # default
> 1138.1123778309993 -- end train, start del
> 688.7927911250008 -- end
>
> $ arena-1m/bin/python3 t1.py  # Changed ARENA_SIZE to 1MiB
> 1085.3363994170013 -- end train, start del
> 84.57135540099989 -- end

688 => 84 looks like an interesting speedup. Would it be technically
possible to make ARENA_SIZE configurable at runtime?

Using the new PEP 587 preinitialization, it shouldn't be too hard to
hard a new command line option and/or an environment variable to tune
the memory allocator:
https://www.python.org/dev/peps/pep-0587/#preinitialization-with-pypreconfig

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.