From 9da8680a40c91916e52b76f7c695e6621b8d2c64 Mon Sep 17 00:00:00 2001 From: 0x822a5b87 Date: Mon, 2 Mar 2026 18:57:54 +0800 Subject: [PATCH] Fix: Increase N for statistically significant performance benchmarking --- challenges/medium/17_dot_product/challenge.html | 2 +- challenges/medium/17_dot_product/challenge.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/medium/17_dot_product/challenge.html b/challenges/medium/17_dot_product/challenge.html index 25eeb170..6fd64457 100644 --- a/challenges/medium/17_dot_product/challenge.html +++ b/challenges/medium/17_dot_product/challenge.html @@ -27,5 +27,5 @@

Constraints

  • A and B have identical lengths
  • 1 ≤ N ≤ 100,000,000
  • -
  • Performance is measured with N = 5
  • +
  • Performance is measured with N = 4194304
  • diff --git a/challenges/medium/17_dot_product/challenge.py b/challenges/medium/17_dot_product/challenge.py index 84641636..c275b6ed 100644 --- a/challenges/medium/17_dot_product/challenge.py +++ b/challenges/medium/17_dot_product/challenge.py @@ -105,7 +105,7 @@ def generate_functional_test(self) -> List[Dict[str, Any]]: def generate_performance_test(self) -> Dict[str, Any]: dtype = torch.float32 - N = 5 + N = 4194304 A = torch.empty(N, device="cuda", dtype=dtype).uniform_(-1.0, 1.0) B = torch.empty(N, device="cuda", dtype=dtype).uniform_(-1.0, 1.0) result = torch.zeros(1, device="cuda", dtype=dtype)