Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[coq] [memo] Better parameters for polymorphic state hashing #751

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- [fleche] Preserve view hint across document changes. With this
change, we get local continuous checking mode when the view-port
heuristic is enabled (@ejgallego, #748)
- [memo] More precise hashing for Coq states, this improves cache
performance quite a bit (@ejgallego, #751)

# coq-lsp 0.1.10: Hasta el 40 de Mayo _en effect_...
----------------------------------------------------
Expand Down
7 changes: 6 additions & 1 deletion coq/state.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ let compare (x : t) (y : t) =
else 1

let equal x y = compare x y = 0
let hash x = Hashtbl.hash x

let hash x =
(* OCaml's defaults are 10, 100, but not so good for us, much improved
settings are below (best try so far) *)
let meaningful, total = (64, 256) in
Hashtbl.hash_param meaningful total x

let mode ~st =
Option.map
Expand Down
Loading