sanitize perf related code

Basically trying to pass jslint/jshint checks. Otherwise IDE highlights errors and makes code unreadable. Disabling validation doesn't seem to be a good idea.