]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141510: Update ftscalingbench to support frozendict (gh-144999)
authorDonghee Na <donghee.na@python.org>
Thu, 19 Feb 2026 14:06:15 +0000 (23:06 +0900)
committerGitHub <noreply@github.com>
Thu, 19 Feb 2026 14:06:15 +0000 (23:06 +0900)
Tools/ftscalingbench/ftscalingbench.py

index 50d0e4c04fc3196927343253f8101d20693717d3..f60f5adba5c12cbc9fc9b180698cb2439e057de6 100644 (file)
@@ -180,6 +180,12 @@ def create_dict():
             "key": "value",
         }
 
+if hasattr(__builtins__, "frozendict"):
+    @register_benchmark
+    def create_frozendict():
+        for i in range(1000 * WORK_SCALE):
+            d = frozendict(key="value")
+
 thread_local = threading.local()
 
 @register_benchmark