turns out both are similar in terms of performance and I found this how to load a custom function in python - https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.create_function
turns out both are similar in terms of performance and I found this how to load a custom function in python - https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.create_function