In the fbthrift-python benchmarks, we observed a performance regression when comparing Python 3.14t to 3.14, particularly during Thrift struct initialization and deserialization. In our tests, we populated sets with 1000 elements. The regression was linked to the use of the PySet_Add() API for building set and frozenset objects, where a critical section is always applied—even when the set is uniquely referenced during initialization.
Linked PRs
In the fbthrift-python benchmarks, we observed a performance regression when comparing Python 3.14t to 3.14, particularly during Thrift struct initialization and deserialization. In our tests, we populated sets with 1000 elements. The regression was linked to the use of the
PySet_Add()API for buildingsetandfrozensetobjects, where a critical section is always applied—even when the set is uniquely referenced during initialization.Linked PRs