Skip to content

Conversation

@Bumblebee00
Copy link
Collaborator

New mechanism for rules, that aims to be much faster. Currently still a expermient

@Bumblebee00 Bumblebee00 marked this pull request as draft November 14, 2025 23:32
@AayushSabharwal
Copy link
Member

Yep, Mattia and I are discussing this on Slack. It's potentially promising, at the very least until we get better rules in SU (which will take a while)

@Bumblebee00
Copy link
Collaborator Author

ok so i improved the new rule mechanism to a almost working state:

  • predicates, commutative checks and defslot are working
  • negative power matching and segments not yet, but they will be easy to add

Then I converted about 600 rules to the new mechanism and tested the loading time.
New:

julia> @benchmark reload_rules()
BenchmarkTools.Trial: 22 samples with 1 evaluation per sample.
 Range (min … max):  212.345 ms … 352.751 ms  ┊ GC (min … max): 0.00% … 39.61%
 Time  (median):     221.739 ms               ┊ GC (median):    3.45%
 Time  (mean ± σ):   227.933 ms ±  28.247 ms  ┊ GC (mean ± σ):  5.77% ±  7.87%

     █▄                                                          
  ▄▄▆███▁▁▄▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄ ▁
  212 ms           Histogram: frequency by time          353 ms <

 Memory estimate: 61.63 MiB, allocs estimate: 1516910.

Old (loading only the same ~600 rules as above):

julia> @benchmark reload_rules()
BenchmarkTools.Trial: 1 sample with 1 evaluation per sample.
 Single result which took 53.839 s (6.36% GC) to evaluate,
 with a memory estimate of 7.09 GiB, over 138098822 allocations.

@Bumblebee00
Copy link
Collaborator Author

it faster 😁😁😁, now remains to test only the time it takes to apply them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants