Optimize timestamp lookup.