# Q: Using Metatheory.jl for code optimization

**URL:** <https://discourse.julialang.org/t/q-using-metatheory-jl-for-code-optimization/88201>\
**Category:** Modelling & Simulations\
**Tags:** question\
**Created:** [October 4, 2022, 2:20am UTC](https://discourse.julialang.org/t/q-using-metatheory-jl-for-code-optimization/88201 "2022-10-04T02:20:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Audrius-St](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/audrius-st/32/24175_2.png) [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Post date:** [October 4, 2022, 2:20am UTC](https://discourse.julialang.org/t/q-using-metatheory-jl-for-code-optimization/88201/1 "2022-10-04T02:20:28Z")

</div>

Hello,

After going through the rather terse Metatheory.jl documentation, there are a number of concepts that are novel and unfamilair to me, so I’m unable to discern if the package can do the following:

It is possible to use Metatheory.jl for code optimization in the sense of reducing the number of basic operations {+, -, x, /, ^} for large polynomial and polynomial -like expressions?

With Sympy, I had used [FORM 4.2.1](https://github.com/vermaseren/form) which performs a [stochastic local search](https://arxiv.org/abs/1409.5223) via [stochastic hill climbing](https://iopscience.iop.org/article/10.1088/1742-6596/1085/2/022007) to find the near-minimal number of operations for a multivariate Horner scheme combined with CSEE [Common Subexpression Elimination].

Is it possible to use Metatheory.jl to do the same or equivalent?
