I wonder if there will be any improvement if the rust version is linked with sqlite3, with LTO enabled. It may inline a few functions, drops many others and might improve the performance.