perf: use arrow functions in hot code paths