Zulip Chat Archive

Stream: general

Topic: rcases is slow


Kenny Lau (Apr 09 2020 at 11:13):

The tactic rcases seems to be slow to parse:

-- parsing took 2.05s
-- elaboration of test_rcases took 140ms
set_option profiler true
theorem test_rcases (h :  n : ,  m : , m = n) : true :=
begin
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  rcases (h 0) with n, hn,
  trivial
end

Kenny Lau (Apr 09 2020 at 11:13):

The elaboration speed seems to be normal relative to my computer

Mario Carneiro (Apr 09 2020 at 11:16):

that's no surprise, the rcases parser is the most complex tactic parser I'm aware of

Mario Carneiro (Apr 09 2020 at 11:17):

I think the general lesson is that the interactive tactic parser could use some optimization

Kenny Lau (Apr 09 2020 at 11:17):

I don't think it was that slow in Lean 3.4

Mario Carneiro (Apr 09 2020 at 11:17):

can you test it e.g. with elan?


Last updated: Dec 20 2023 at 11:08 UTC