mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 03:32:23 +03:00
revert
This commit is contained in:
parent
5376341961
commit
006478ea8b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user