Toy example I wrote is already inside function().
Thus, As you reflect your comments, It become nested function.
Allocation and memory is decreased a lot, but computational time is increased.
and @turbo make problem in my real code as follow:
LoopVectorization.check_args
on your inputs failed; running fallback @inbounds @fastmath
loop instead.
│ Use warn_check_args=false
, e.g. @turbo warn_check_args=false ...
, to disable this warning.
anyway, it is good tool and thank you for introduce it me:)