Tuned compiled function
Merge branch 'feature/refactor-speed'