[issue44283] Add jump table for certain safe match-case statements

Brandt Bucher report at bugs.python.org
Tue Jun 1 23:35:37 EDT 2021


Brandt Bucher <brandtbucher at gmail.com> added the comment:

Hm. I’m not sure if the HAMT makes much sense. We don’t really care about efficient mutation or copies... constant-time lookups seem to be overwhelmingly the most valuable factor here.

I personally think that creating some sort of hashable dict and teaching marshal how to serialize/deserialize it could be a promising path forward. I imagine its actual design could mirror dict (sort of like set/frozenset).

That might be a rather drastic step though. Perhaps it’s better to first prove that building a mapping at runtime is too slow.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44283>
_______________________________________


More information about the Python-bugs-list mailing list