Skip to content

Performance degradations v0.1.6 -> v0.2.5 #935

@patham9

Description

@patham9

Describe the bug

MeTTa v0.2.5 is significantly slower (more than 10x) than v0.1.6 in some examples.
Interestingly in many other benchmark codes I had it has improved performance by a factor of 2-3, but in the cases where it degraded it is usually a way higher factor, which could hint to a deeper issue that got introduced.

The following is a quite small example which I hope will be helpful to investigate:

(= (Add $x Z) $x)
(= (Add $x (S $y)) (Add (S $x) $y))
(= (Add (S $x) $y) (S (Add $x $y)))

!(Add (S (S (S Z)))
      (S (S (S Z))))

To Reproduce
Steps to reproduce the behavior:
Running the example with the Rust MeTTa interpreter.

Expected behavior
Similar solving time as v0.1.6.

Actual behavior
About 10-15x slower.

Additional context

  • MeTTa version: v0.2.5 compared with v0.1.6

Metadata

Metadata

Assignees

Labels

performanceOpportunity to optimize performance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions