Added timing output for performance measurement