egraphs-good / egglog

egraphs + datalog!
https://egraphs-good.github.io/egglog/
MIT License
458 stars 54 forks source link

Sort declaration cleanup #442

Closed Alex-Fischman closed 1 month ago

Alex-Fischman commented 1 month ago
  1. Removes name from basic sorts.
  2. Removes unconditional get_sort.
  3. Adds Presort trait.
  4. Removes basic sorts from being stored in primitives.
  5. Removes unused and undocumented macros.
  6. Makes Rational set lazy static.
codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #442 will improve performances by 27.3%

Comparing Alex-Fischman:sort-names (8ae1427) with main (43de12f)

Summary

⚡ 1 improvements ✅ 86 untouched benchmarks

Benchmarks breakdown

Benchmark main Alex-Fischman:sort-names Change
eggcc-extraction 5.5 s 4.3 s +27.3%
Alex-Fischman commented 1 month ago

I had to cache the sort names to fix a performance regression with cykjson, where the lookup in the symbol table was noticeable. This PR can be merged with the cached names, and I'm going to investigate whether the Symbols are actually helping with performance.

Alex-Fischman commented 1 month ago

@yihozhang The ~20% speedup on eggcc-extraction is what we expect to see; it matches the speedup in #441. (It's lower than you might be expecting because Saul changed run 5 to run 2 to speed up CI in #443.)

saulshanabrook commented 1 month ago

Wow nice, that's a huge win!