> I believe SQLite also has to write the data twice, using the WAL. Maybe there is an optimization to avoid that though.
If I understand correctly, it writes the data twice if you're not using WAL. With WAL, it only writes the data once [1].
[1]: The "Performance Considerations" section of https://www.sqlite.org/wal.html