Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add benchmark script
  • Loading branch information
LindaSummer committed Nov 16, 2025
commit 273d2afd2b5d5842ff5fa1398e0aadd9b4d575e0
12 changes: 12 additions & 0 deletions Tools/ftscalingbench/ftscalingbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import sys
import threading
import time
from dataclasses import dataclass
from operator import methodcaller

# The iterations in individual benchmarks are scaled by this factor.
Expand Down Expand Up @@ -201,6 +202,17 @@ def method_caller():
obj = MyClass()
for i in range(1000 * WORK_SCALE):
mc(obj)

@dataclass
class MyDataClass:
x: int
y: int
z: int

@register_benchmark
def instantiate_dataclass():
for _ in range(1000 * WORK_SCALE):
obj = MyDataClass(x=1, y=2, z=3)

def bench_one_thread(func):
t0 = time.perf_counter_ns()
Expand Down
94 changes: 0 additions & 94 deletions edward-test-bench.py

This file was deleted.