lean4-htt/src/Init/Data
Mario Carneiro 49f66dc485
perf: rewrite UnusedVariables lint (#3186)
This is a rewrite of the `UnusedVariables` lint to inline and simplify
many of the dependent functions to try to improve the performance of
this lint, which quite often shows up in perf reports.

* The mvar assignment scanning is one of the most expensive parts of the
process, so we do two things to improve this:
  * Lazily perform the scan only if we need it
* Use an object-pointer hashmap to ensure that we don't have quadratic
behavior when there are many mvar assignments with slight differences.
* The dependency on `Lean.Server` is removed, meaning we don't need to
do the LSP conversion stuff anymore. The main logic of reference finding
is inlined.
* We take `fvarAliases` into account, and union together fvars which are
aliases of a base fvar. (It would be great if we had `UnionFind` here.)

More docs will be added once we confirm an actual perf improvement.

---------

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2024-03-21 12:28:57 +00:00
..
Array refactor: clean up public API around Array.eraseIdx (#3676) 2024-03-17 06:25:10 +00:00
BitVec feat: more BitVec lemmas (#3729) 2024-03-21 11:56:24 +00:00
ByteArray fix: reference implementation ByteArray.copySlice (#2967) 2023-12-16 20:26:16 +00:00
Char feat: log2 for Fin and UInts 2022-11-29 01:05:06 +01:00
Fin chore: bool and prop lemmas for Mathlib compatibility and improved confluence (#3508) 2024-03-04 23:56:30 +00:00
FloatArray chore: snake-case attributes (part 2) 2022-10-19 09:28:08 -07:00
Format feat: additional options for Format.pretty (#3264) 2024-02-07 23:25:21 +00:00
Int chore: add @[simp] to Nat.succ_eq_add_one, and cleanup downstream (#3579) 2024-03-13 05:35:52 +00:00
List feat: BitVec.ofBoolListLE and theorems (#3721) 2024-03-21 04:48:29 +00:00
Nat chore: incorrectly annotated theorems 2024-03-13 12:37:58 -07:00
Option feat: snapshot trees and language processors (#3014) 2024-03-14 13:40:08 +00:00
String refactor: reduced unsed imports (#3464) 2024-02-22 18:12:57 +00:00
ToString fix: make List.toString tail-recursive 2022-12-12 22:58:21 +01:00
UInt feat: System.Platform.target (#3207) 2024-01-24 12:11:00 +00:00
AC.lean chore: incorrectly annotated theorems 2024-03-13 12:37:58 -07:00
Array.lean chore: upstream Std.Data.Array.Init.Lemmas (#3343) 2024-02-15 17:50:07 +11:00
Basic.lean
BitVec.lean chore: add missing copyright headers (#3411) 2024-02-20 01:49:55 +00:00
Bool.lean chore: add example to explanation cond_decide is not simp (#3615) 2024-03-06 16:58:12 +00:00
ByteArray.lean
Cast.lean chore: upstream NatCast and IntCast (#3347) 2024-02-16 00:54:22 +00:00
Channel.lean feat: snapshot trees and language processors (#3014) 2024-03-14 13:40:08 +00:00
Char.lean
Fin.lean chore: upstream Std.BitVec.* (#3400) 2024-02-19 12:43:34 -08:00
Float.lean doc: state that Float is IEEE compliant (#3157) 2024-01-10 12:16:42 +00:00
FloatArray.lean
Format.lean
Hashable.lean chore: add helper function 2023-07-11 19:19:42 -07:00
Int.lean chore: upstream Std.Data.Int (#3635) 2024-03-11 21:40:48 +00:00
List.lean chore: upstream Std.Data.List.Init.Lemmas (#3341) 2024-02-15 03:19:23 +00:00
Nat.lean chore: upstream Std.Data.Nat (#3634) 2024-03-08 17:00:46 +00:00
OfScientific.lean chore: use more specific import in OfScientific (#3165) 2024-01-11 18:23:43 +00:00
Option.lean chore: upstream Option material from Std (#3356) 2024-02-16 02:05:18 +00:00
Ord.lean perf: rewrite UnusedVariables lint (#3186) 2024-03-21 12:28:57 +00:00
Prod.lean feat: add simp lemmas and instances for LawfulBEq 2022-07-11 14:19:41 -07:00
Queue.lean doc: document Init.Data.Queue 2022-09-13 03:09:25 -07:00
Random.lean chore: upstream Std.Data.Int (#3635) 2024-03-11 21:40:48 +00:00
Range.lean feat: let get_elem_tactic_trivial handle [a]'h.2 (#3132) 2024-01-08 16:23:09 +00:00
Repr.lean feat: log2 for Fin and UInts 2022-11-29 01:05:06 +01:00
Stream.lean chore: convert doc/mod comments from /- to /--//-! (#1354) 2022-07-22 12:05:31 -07:00
String.lean
Sum.lean chore: upstream solve_by_elim (#3408) 2024-02-21 01:16:04 +00:00
ToString.lean
UInt.lean feat: log2 for Fin and UInts 2022-11-29 01:05:06 +01:00