Performance tuning by using pointers