Parsing long but simple expressions should not take 30s+
Open
Nobody has claimed this yet.
P-medium
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Ah, I see I can call
lean --profilefrom https://lean-lang.org/talks/lmu2024.pdf, which gives% lean --profile test_30_noprofile.lean parsing took 28.2s test_30_noprofile.lean:12:0: warning: declaration uses 'sorry' elaboration took 252ms cumulative profiling times: attribute application 0.00892ms elaboration 254ms fix level params 0.0147ms import 65.5ms initialization 17ms instantiate metavars 0.017ms interpretation 5.52ms linting 11.7ms parsing 28.2s process pre-definitions 0.174ms share common exprs 0.757ms tactic execution 0.177ms type checking 0.132ms
Originally posted by @JasonGross in #8038
See that issue for the code and more context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with issue #8038, which contains the code and context for the long-expression parsing case. Use the reported lean --profile output to confirm that parsing, rather than elaboration, dominates runtime. Done means identifying and resolving the parsing slowdown without regressing the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100