dsharlet / slinky

Optimize pipelines for locality
MIT License
8 stars 2 forks source link

Make `symbol_id`s compact before evaluating #13

Open dsharlet opened 9 months ago

dsharlet commented 9 months ago

Simplification and other operations might result in non-contiguous symbol_id values, which means wasted space when running evaluate. A pass to make these compact could be useful. It would require rewriting the node_context to preserve the names (for printing).

dsharlet commented 9 months ago

Related to #3 (but not the same)

steven-johnson commented 8 months ago

If we did this, would it make sense to require compact symbol_ids for evaluate()? Then we could dispense with a map structure and just use a vector.