# ARX.SDK on MongoDB: benchmarks

ARX.SDK's MongoDB provider against the hand-written driver code a developer would write (`BsonDocument`, the baseline)
and the driver's typed API (POCO classes). BenchmarkDotNet job Standard (3 warm-ups, 8 iterations), Release, on the
`arx-mongo` container (MongoDB 7.0, a single-node replica set, Docker Desktop on Windows), database `arx_bench`.
Reports in `results/`. Ratios are against the raw driver; numbers from one machine, so read the ratios, not the times.

| Operation | ARX against the raw driver | Against the typed driver |
|---|---|---|
| Create, one document | 0.92× (level) | level |
| CreateMultiple, 100 to 10,000 documents, all in one transaction | 0.90–0.97× (level) | level to 1.3× |
| UpdateMultiple by id, 100 and 1,000 documents, in a transaction, each checked found | 1.16×, 1.07× | – |
| Update one document | 0.64× (ARX skips the transaction for one document) | – |
| DeleteMultiple by id, 100 to 10,000 | 0.93–1.24× (inside the spread: the single-operation runs vary ±40%) | – |
| Retrieve by id | 1.16× (0.17 ms) | 1.06× |
| RetrieveMultiple, 100 / 1,000 / 10,000 documents | 0.98× / 1.17× / 1.35× | the typed driver is 0.61× the raw one at 10,000 |

What the numbers say: writes are level with the driver; reads cost the dictionary entity (2.2× the raw driver's
allocations), as on PostgreSQL, SQL Server and MySQL.
