leanprover / leanprover/cslib

Performance Profiling

Open
#136 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
709
Forks
200
Avg merge
3d 6h
Merged PRs (30d)
45

Description

Maybe this should be a running meta-issue. I've noticed that some of the lambda calculus modules are slow, so I decided to look at build times. Here are the 15 slowest (of ~50) from me building locally, which happens to coincide with a cutoff of 5 seconds:

Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype (11s)
Cslib.Logics.LinearLogic.CLL.Basic (10s)
Cslib.Foundations.Data.FinFun (10s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Stlc.Basic (9.1s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.WellFormed (8.8s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Typing (8.5s)
Cslib.Logics.LinearLogic.CLL.PhaseSemantics.Basic (8.4s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Opening (8.3s)
Cslib.Foundations.Data.OmegaSequence.Init (8.0s)
Cslib.Foundations.Lint.Basic (7.2s)
Cslib.Foundations.Semantics.LTS.Bisimulation (6.8s)
Cslib.Foundations.Data.OmegaSequence.Flatten (6.0s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Safety (5.7s)
Cslib.Languages.CCS.BehaviouralTheory (5.7s)
Cslib.Languages.LambdaCalculus.LocallyNameless.Untyped.FullBetaConfluence (5.2s)

I have a guess at some issues in Cslib.Languages.LambdaCalculus.LocallyNameless related to grind rules for typing contexts. Some others may just be longer files, there is not necessarily something wrong in all cases.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the local build timings for the listed Cslib modules, then inspect Cslib.Languages.LambdaCalculus.LocallyNameless and its grind rules for typing contexts. Compare the slower modules with longer-file cases and determine whether a specific cause or actionable improvement can be identified; the issue does not define a completion target.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.