Closed
Description
Looks like head
isn't O(1), at least on node v4.4.7.
I measured with purescript-benchotron as follows:
benchHead :: Benchmark
benchHead = mkBenchmark
{ slug: "head"
, title: "Head of a structure"
, sizes: (1 .. 8) <#> (_ * 150)
, sizeInterpretation: "Number of elements in the structure"
, inputsPerSize: 1
, gen: randomArray
, functions: [ benchFn "Array" A.head
, benchFn "Array'" (_ `A.index` 0)
]
}
Metadata
Metadata
Assignees
Labels
No labels