Updated "perf.cpp"

Please see the comments on what needs to be done.