From 006478ea8b52e9aa2193632f480e5108a4d26eca Mon Sep 17 00:00:00 2001 From: Gregory Travis Date: Thu, 30 May 2024 11:53:36 -0400 Subject: [PATCH] revert --- .../benchmarks/semantic/VectorBenchmarks.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/engine/runtime-benchmarks/src/main/java/org/enso/interpreter/bench/benchmarks/semantic/VectorBenchmarks.java b/engine/runtime-benchmarks/src/main/java/org/enso/interpreter/bench/benchmarks/semantic/VectorBenchmarks.java index 93fde0186d..e34c8c0d04 100644 --- a/engine/runtime-benchmarks/src/main/java/org/enso/interpreter/bench/benchmarks/semantic/VectorBenchmarks.java +++ b/engine/runtime-benchmarks/src/main/java/org/enso/interpreter/bench/benchmarks/semantic/VectorBenchmarks.java @@ -38,7 +38,6 @@ public class VectorBenchmarks { import Standard.Base.Data.Vector.Builder import Standard.Base.Data.Vector.Vector import Standard.Base.Data.Array_Proxy.Array_Proxy - from Standard.Base.Data.Boolean import False avg arr = sum acc i = if i == arr.length then acc else @@ -46,15 +45,15 @@ public class VectorBenchmarks { (sum 0 0) / arr.length fibarr size modulo = - Vector.build initial_capacity=size propagate_warnings=False b-> - b.append 1 - b.append 1 + b = Builder.new size + b.append 1 + b.append 1 - add_more n = if n == size then b else - b.append <| (b.at n-1 + b.at n-2) % modulo - @Tail_Call add_more n+1 + add_more n = if n == size then b else + b.append <| (b.at n-1 + b.at n-2) % modulo + @Tail_Call add_more n+1 - add_more 2 + add_more 2 . to_vector to_vector arr = Vector.from_polyglot_array arr to_array vec = vec.to_array