chore: Nat.repr microbenchmark (#3888)

This commit is contained in:
Joachim Breitner 2024-04-17 20:10:32 +02:00 committed by GitHub
parent 627a0f308b
commit 4f50544242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,8 @@
def main : List String → IO Unit
| [n] => do
let mut s := 0
for i in [0:n.toNat!] do
for j in [:i] do
s := s + j.repr.length
IO.println s
| _ => throw $ IO.userError "give upper bound"

View file

@ -0,0 +1 @@
5000

View file

@ -0,0 +1 @@
44945605

View file

@ -302,6 +302,14 @@
run_config:
<<: *time
cmd: lean reduceMatch.lean
- attributes:
description: nat_repr
tags: [fast, suite]
run_config:
<<: *time
cmd: ./nat_repr.lean.out 5000
build_config:
cmd: ./compile.sh nat_repr.lean
- attributes:
description: unionfind
tags: [fast, suite]