Skip to content

Add performance tests #1439

Open
Open
@MatthewDaggitt

Description

@MatthewDaggitt

It would be great to add some performance tests to the library. Performance in Agda itself (rather than after compilation) can be done via agda-bench. Here's an example file that we used to benchmark Data.List.Sort.MergeSort.

module Performance.Sorting where

open import Data.List.Base
open import Data.Nat.Properties
open import Data.Nat.PseudoRandom.LCG

open import Data.List.Sort.MergeSort ≤-decTotalOrder

n  = 1000
x₀ = 666

bench-list     = list n random0 x₀
bench-sum      = sum bench-list
bench-reverse  = sum (reverse bench-list)
bench-sort     = sum (sort bench-list)

Other things that would be nice to benchmark:

  • all numeric operations (including GCD)
  • basic list and vector operations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions