small perf project fix
- extracted sum calculation from timed block
- fixed std::function calculation