SQLite Forum

Benefits of using SQLite functions
Considering your specific example: It would be difficult to detect a runtime efficiency difference among alternate ways to launch a separate process, feed input to it, and collect its output. (That is what the "exec ..." TCL call does.)

Treating your question more generally: Function calls are relatively cheap compared to what else is done in most functions, but the parameter passing, call and return always add some execution time. How significant that is depends on how much useful work the function does in comparison to that calling overhead.