TM::Index is a Perl module that offers Topic Maps and Generic Indexing support.
# this package only provides generic functionality
# see TM::Index::* for specific indices
One performance bottleneck when using the TM package or any of its subclasses are the low-level query functions match_forall and match_exists. They are looking for assertions of a certain nature. Almost all high-level functions, and certainly TM::QL use these.
This package (actually more its subclasses) provides an indexing mechanism to speed up the match_* functions by caching some results in a very specific way. When an index is attached to a map, then it will intercept all queries going to these functions.