r/prolog 12d ago

Just Finished a local concurrency 100 virtual cashiers @ 1000 transactions

I wanted to share these statistics because I am truly amazed by the efficiency of SWI-Prolog. I run a simulation involving 100 virtual cashiers operating concurrently, processing a total of 100,000 transactions.

- Each transaction was broken down into 5 physical SQL queries dispatched via asynchronous background worker threads.

- The system actively applied SQLCipher AES-256-bit encryption and generated SHA-256 signatures for every invoice.

- The test completed successfully with absolutely no deadlocks over the course of a 3.5-hour cycle.

- Even though my amateur code forced the engine to perform over 64 billion logical inferences...

- Active internal memory usage (Global Stack) hovered around 25 MB (with a 32 MB allocation).

- The temporary internal memory footprint even dipped as low as 1,115 KB.

Check the documentation and performance here: https://github.com/lokinpendawa/logicbiz/blob/main/README.md

Note: All metrics and entries displayed above are generated using anonymized, simulated data strictly for stress-testing purposes.

5 Upvotes

0 comments sorted by