SQLite Forum

Increasing insert performance of an in-memory db
A couple thoughts:

The number of cores in the machine is irrelevant, for the highest insert speed you need to be using a single thread/core for that. If you are not doing so then try to have a single inserter thread.

I am not sure about your transaction size, but you should be able to achieve much higher throughput with larger transactions on modern hardware.

Have you tried WAL with synchronous=0? This option leads to better insert speeds in some cases.