Added timing for local and shared memory