Platform Used

Those numbers were taken from the "external database" sample, which is available on both versions of the framework.
This is the very same benchmark as used in previous benchmarks on this blog or our documentation. So you could compare the numbers.

But we run the tests on a new computer, featuring a Intel(R) Core(TM) i5-7300U cpu, from a good old Thinkpad T470 notebook, with a SATA SSD.
So on a more modern hardware, like a high-end AMD or Xeon server, the million inserts is easily passed. And on a slow VM, you will get pretty good numbers.

We run the tests on Linux x86_64 (Debian 11), compiled from FPC 3.2 stable - which is our target platform for performance.
In fact, performance matters mainly on the server side - clients are usually fast enough to run whatever process they need, and the ORM/database/persistence process is likely to be located on the server side. So in mORMot 2, we focused on a x86_64 Linux server for performance, which is the cheapest and safest solution around.

Both frameworks used our in-memory heap manager for FPC, written in x86_64 assembly. It has a noticeable performance benefit, especially on multi-thread process (not shown here, but during the main regression tests).

Insertion Speed

Here are the mORMot 2 insertion numbers:

Running tests using Synopse mORMot framework 2.0.1, compiled with Free Pascal 3.2 64 bit, against SQLite 3.37.2, on Debian GNU/Linux 11 (bullseye) - Linux 5.10.0-10-amd64, at 2022-02-14 21:09:37.

 DirectBatchTransBatch Trans
Sqlite file full98590874089242072
Sqlite file off13534474428151315919624
Sqlite file off exc42961691037153374929281
Sqlite file off exc aes26882533788152795874814
Sqlite in memory114664969743152190972478
In memory static41189510869564287241301236
In memory virtual38544512004804127621219660
External sqlite file full107595783531111043
External sqlite file off16509291528151890390502
External sqlite file off exc58922354924150179392649
External sqlite in memory114476991080154564991375
Remote sqlite socket1978915576319439236406

In comparison, here are the mORMot 1 performance - which was already ahead of most other solutions - on the same machine:

Running tests using Synopse mORMot framework 1.18.6365, compiled with Free Pascal 3.2 64 bit, against SQLite 3.37.2, on Debian GNU/Linux 11 (bullseye) - Linux 5.10.0-10-amd64, at 2022-02-15 10:27:28.

 DirectBatchTransBatch Trans
Sqlite file full9750344560390704
Sqlite file off1250421235096605272910
Sqlite file off exc3618924470294754273687
Sqlite file off exc aes2293321985796513267881
Sqlite in memory7995327526997776269963
In memory static208125473126227821505254
In memory virtual202683467595220031472545
External sqlite file full100280949603102247
External sqlite file off15329190701109346301768
External sqlite file off exc48818264760109767304710
External sqlite in memory93820303766111437311779
Remote sqlite socket17952683601491597096

As you can see, the performance benefits are noticeable. For a MicroService, an embedded SQlite3 storage may give pretty amazing scalability of your SOA processing.

Reading Speed

Here are the mORMot 2 reading numbers:

 By oneAll VirtualAll Direct
Sqlite file full11577511510121121956
Sqlite file off12319811574071162925
Sqlite file off exc27050411627901174122
Sqlite file off exc aes26997811602271171920
Sqlite in memory27395011542011150350
In memory static46755118037511743071
In memory virtual464209771188777786
External sqlite file full1848365222471142204
External sqlite file off1809005192371155134
External sqlite file off exc1860465125831153003
External sqlite in memory27455911687701182872
Remote sqlite socket22246444820873133

In comparison, here are the mORMot 1 performance - which was already ahead of most other solutions - on the same machine:

 By oneAll VirtualAll Direct
Sqlite file full72439847888848176
Sqlite file off73248837100858811
Sqlite file off exc111037845737848032
Sqlite file off exc aes112973863557869716
Sqlite in memory111766864154879043
In memory static22907413958681401738
In memory virtual228081625782626095
External sqlite file full107587412745840618
External sqlite file off132890393948805023
External sqlite file off exc133347411082821422
External sqlite in memory135197411658820075
Remote sqlite socket19991367161643832

Feedback Welcome

We encourage you to download the full source of both framework, from:

Then you can compile the "15 - External DB performance" sample on mORMot 1, and "extdb-bench" example on mORMot 2.

Feedback is welcome in our forum, as usual!