cpython/Modules/clinic
Michael Droettboom 8614f86b71
gh-131525: Cache the result of tuple_hash (#131529)
* gh-131525: Cache the result of tuple_hash

* Fix debug builds

* Add blurb

* Fix formatting

* Pre-compute empty tuple singleton

* Mostly set the cache within tuple_alloc

* Fixes for TSAN

* Pre-compute empty tuple singleton

* Fix for 32-bit platforms

* Assert that op != NULL in _PyTuple_RESET_HASH_CACHE

* Use FT_ATOMIC_STORE_SSIZE_RELAXED macro

* Update Include/internal/pycore_tuple.h

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Fix alignment

* atomic load

* Update Objects/tupleobject.c

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-03-27 09:57:06 -04:00
..
_abc.c.h
_asynciomodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_bisectmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_bz2module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_codecsmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_collectionsmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_contextvarsmodule.c.h
_csv.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_curses_panel.c.h gh-111178: Generate correct signature for most self converters (#128447) 2025-01-20 12:40:18 +01:00
_cursesmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_datetimemodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_dbmmodule.c.h gh-111178: Generate correct signature for most self converters (#128447) 2025-01-20 12:40:18 +01:00
_elementtree.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_functoolsmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_gdbmmodule.c.h gh-111178: Generate correct signature for most self converters (#128447) 2025-01-20 12:40:18 +01:00
_hashopenssl.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_heapqmodule.c.h
_localemodule.c.h
_lsprof.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_lzmamodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_opcode.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_operator.c.h gh-115808: Add `is_none and is_not_none to operator` (#115814) 2024-08-10 20:16:34 +01:00
_pickle.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_posixsubprocess.c.h
_queuemodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_randommodule.c.h gh-111178: Change Argument Clinic signature for METH_O (#130682) 2025-03-11 16:33:36 +01:00
_ssl.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_statisticsmodule.c.h
_struct.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_suggestions.c.h
_sysconfig.c.h
_testclinic.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_testclinic_depr.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_testclinic_limited.c.h
_testinternalcapi.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_testmultiphase.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_threadmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_tkinter.c.h gh-111178: Change Argument Clinic signature for METH_O (#130682) 2025-03-11 16:33:36 +01:00
_tracemalloc.c.h
_typingmodule.c.h
_weakref.c.h
_winapi.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
_zoneinfo.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
arraymodule.c.h gh-111178: Change Argument Clinic signature for METH_O (#130682) 2025-03-11 16:33:36 +01:00
binascii.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
blake2module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
cmathmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
fcntlmodule.c.h
gcmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
grpmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
itertoolsmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
mathmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
md5module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
overlapped.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
posixmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
pwdmodule.c.h
pyexpat.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
readline.c.h gh-126895: Fix readline module in free-threaded build (#131208) 2025-03-17 11:57:11 -04:00
resource.c.h
selectmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
sha1module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
sha2module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
sha3module.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
signalmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
socketmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
symtablemodule.c.h
syslogmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
termios.c.h
timemodule.c.h
unicodedata.c.h
zlibmodule.c.h gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00