The original claim being discussed is about the overhead of an in-process database vs. a database server in a separate process, not about whether SQLite or PostgreSQL have a faster database engine.
You appear to have benchmarked how quickly Python can access memory vs how quickly Python can open and close a socket. I'm not sure the DBs were required in any way.