This came up before and @vlaviron said that it depends on whether the local function takes arguments from its context (a closure). So writing the local function as though it was external should avoid additional allocation.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Hi is there anyone who could have a look at my code and provide feedback on style, etc | 5 | 619 | July 4, 2022 | |
This is my first OCaml program. Advices for improvement? | 3 | 470 | March 21, 2023 | |
New Tutorials on Basics of OCaml | 15 | 1988 | November 17, 2023 | |
Help revamping the getting started tutorials in ocaml.org | 5 | 1174 | September 8, 2023 | |
Got further questions after attending Jane Street's OCaml Workshop? Ask here! | 9 | 1690 | April 13, 2018 |