In response to Reply#15:
Yes, sometimes it helps to make the intended code structure more clear (to humans) if discrete portions are moved into separate functions. This does not make the code more efficient, but does tend to make authoring, debugging, and maintaining code easier.
Once you have the code working, you can always squeeze out a tiny bit more efficiency by moving "called-once" subfunctions in-line, but my experience has been that there's seldom a need for that tiny improvement - while there's nearly always a need for clarity. ![]()