Reduce memory usage by using symbols.
Map each triple component only once.

Saves memory by not storing duplicate components,
and increases performance as well.