Closed phlegmaticprogrammer closed 9 years ago
I have split up the timing like this:
val s
timeit
s = '‹x› = ‹y›'
timeit
theorem foo: s
th
foo
The first timing gives 481ms, the second one 10ms, so the main problem is with the statement
s = '‹x› = ‹y›'
The reason for this inefficiency seems clear, it is because x
and y
are first converted into preterms, then the preterm ‹x› = ‹y›
is formed, then this preterm is converted to a term, which involves type inference for the whole preterm again.
The solution to this seems to me to add an additional constructor for preterms which wraps a term. That's going to take some work.
I have dealt with this particular performance problem, the first timing is now 5ms, the second one 9ms. There are plenty of other performance issues, but let's deal with those when we hit them.
Given the terms
x
=and
y
=and
t
=the code
needs 455ms to execute, which seems a bit slow.