mkindex: Optimize