I don’t know much (anything) about compiler internals/inlining, but after reading the responses for a similar question Local functions and performance - #3 by vlaviron I had started using the first style in your post for writing my inner loop functions, and if the task at hand was otherwise something where I cared enough to write a microbenchmark for that could show a difference in allocations.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Local functions and performance | 6 | 1594 | April 11, 2022 | |
Closures, Inlining, performance optimization for anonymous functions | 9 | 1945 | April 27, 2018 | |
Question on mutual recursion | 1 | 157 | November 17, 2024 | |
Memory usage in recursive function as infinite loop | 3 | 2015 | September 7, 2019 | |
[mystery solved] Compiling with continuations: flambda and performance | 7 | 1229 | October 16, 2020 |