Zulip Chat Archive
Stream: general
Topic: Performance of `interval_cases`
Eric Wieser (Sep 22 2022 at 09:00):
I was surprised to find that tactic#interval_cases struggles on intervals with more than one or two items, for instance:
import tactic.interval_cases
set_option profiler true
example (i < 5) : true := by interval_cases i; trivial -- 985ms
example (i < 6) : true := by interval_cases i; trivial -- 1.88s
example (i < 7) : true := by interval_cases i; trivial -- 3.35s
example (i < 8) : true := by interval_cases i; trivial -- 6.2s
The runtime appears to be exponential in the length of the interval!
Does this look like a deep refl causing the issue?
Mario Carneiro (Sep 22 2022 at 09:17):
yeah, this is a known issue. I started working on a replacement but it got delayed
Last updated: Dec 20 2023 at 11:08 UTC