From 2aa819faed6e9c587fdd09ecb08c0081e0884d7a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 11 Jan 2024 15:50:12 -0800 Subject: [PATCH] Always instantiate Float32Array in the cost array of findOptimalSegmentationInternal. (#342) --- resources/perf.webkit.org/public/shared/statistics.js | 2 +- resources/perf.webkit.org/public/v3/bundled-scripts.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/perf.webkit.org/public/shared/statistics.js b/resources/perf.webkit.org/public/shared/statistics.js index 5ed631a17..a47d17533 100644 --- a/resources/perf.webkit.org/public/shared/statistics.js +++ b/resources/perf.webkit.org/public/shared/statistics.js @@ -597,7 +597,7 @@ var Statistics = new (function () { function findOptimalSegmentationInternal(cost, previousNode, values, costMatrix, segmentCount) { - cost[0] = [0]; // The cost of segmenting single value is always 0. + cost[0] = new Float32Array([0]); // The cost of segmenting single value is always 0. previousNode[0] = [-1]; for (var segmentStart = 0; segmentStart < values.length; segmentStart++) { var costOfOptimalSegmentationThatEndAtCurrentStart = cost[segmentStart]; diff --git a/resources/perf.webkit.org/public/v3/bundled-scripts.js b/resources/perf.webkit.org/public/v3/bundled-scripts.js index 521eb05af..4e9162822 100644 --- a/resources/perf.webkit.org/public/v3/bundled-scripts.js +++ b/resources/perf.webkit.org/public/v3/bundled-scripts.js @@ -73,7 +73,7 @@ function allocatePreviousNodeForSegmentation(values,segmentCount) {var previousNode=new Array(values.length);for(var i=0;i