Saturday, December 5, 2026

Local LLMs for Your Delphi Work — Follow-Up: Shootout Qwen3.6 vs. Qwen4

This is a follow-up to the series on running local LLMs against a structured Delphi benchmark (AT1–AT6, plus the VT pre-checks). The first follow-up compared qwen3.6:35b-a3b with KAT-Coder-V2.5-Dev; the second swapped the inference engine for NInfer. This post swaps the model generation: qwen3.6:35b-a3b against its successor qwen4:35b-a3b, both on Ollama, both on the same RTX 5090. The series is no longer only about migration — routing, tool-calling, code comprehension and patching are all part of “your Delphi work” — and the title says so from here on.


The Short Version

On our benchmark, Qwen4 is the best local model we have tested — but it is better, not faster, and it needs a large output budget. Averaged over all seven tests (a missing or empty answer counts as 0), it reaches 80.9 against 70.5 for Qwen3.6, a lead of 10.4 points. It ranks first in our full table, ahead of the dense qwen3.8:27b (76.4), which runs at roughly a third of the speed.

The gain is not spread evenly, and that is the interesting part:

Suite Qwen3.6 Qwen4 Difference
AT1 secrets (EN)47.072.4+25.4
AT2 comprehension64.886.3+21.5
AT1-DE secrets (DE)43.856.8+13.0
AT6 model routing77.884.4+6.6
AT3 patch generation77.884.0+6.2
AT4 complexity routing82.483.6+1.2 (tie)
AT5 tool-calling100.098.6−1.4 (tie)

Both models answered all 390 tasks, so there is only one way to count here. How we got there is described below — Qwen4 needed a second pass.

Code questions improve a lot. Classification and routing were already at the ceiling with Qwen3.6, and Qwen4 does not change that. And on raw generation speed, Qwen3.6 is clearly ahead: about 227 tok/s against about 143.


How We Measured — and What Changed Twice

This post was nearly published with wrong conclusions, so the history belongs here.

Stage 1: old Qwen3.6 numbers. Our first comparison used old Qwen3.6 results (from 18.05., 20.05. and 03.08.2026, produced with an older Ollama) against a fresh Qwen4 run on Ollama 0.40.21. There, Qwen4 led by 14 points on the mean (79.9 against 65.9) and looked about as fast as Qwen3.6. We did not trust it, because the Ollama version differed.

Stage 2: same Ollama. On 05.12.2026 we re-measured Qwen3.6 on the same Ollama 0.40.21, same machine, same tasks, same scoring. The lead shrank to 9.4 points. The effect of the update alone, with the model unchanged:

  • About 60 % more tokens per second (about 227 instead of about 143, mean of AT1, AT2 and AT4).
  • +4.6 points on the mean (65.9 → 70.5), almost entirely from questions about single files (AT1 +5.4, AT1-DE +5.5, AT3 +4.0). AT2 and AT4 to AT6 stay the same within noise.
  • Prompt lengths, old and new, are almost identical, so “the old version silently truncated prompts” is not the explanation. Our guess is the newer backend, plus the MTP speculation that Ollama switches on automatically. That is a guess, not a measurement.

The lesson is blunt: only compare models on the same Ollama version. The older tables of this series are only loosely comparable with the numbers here.

Stage 3: a larger output limit for Qwen4. In the Stage 2 run, Qwen4 had six failures (five in AT1-DE, AT2 and AT3, one in the VT9 pre-check): empty answers or a timeout. All Qwen4 runs used num_predict 8192. We re-ran exactly these six with num_predict 32768 (and, for AT1-DE, a timeout of 1800 s instead of 300 s). All six were answered. Those are the Qwen4 numbers in this post.

Be aware that the frame is unequal for these six tasks: Qwen4 got 32768 tokens; Qwen3.6 ran everywhere with 8192. But Qwen3.6 never hit the limit and did not have a single failed answer, so a larger limit would not have helped it.

The effect on Qwen4 (errors counted as 0 in both Qwen4 columns):

Suite Tasks Qwen3.6 Qwen4, limit 8192 Qwen4, limit 32768 Qwen4 failures at 8192
AT13047.072.472.40
AT1-DE3043.854.856.81
AT212064.884.286.33
AT33077.881.084.01
AT49082.483.683.60
AT573100.098.698.60
AT66077.884.484.40
Mean (7 tests)70.579.980.9

With the larger limit, the lead grows from 9.4 to 10.4 points. The conclusion does not depend on which limit we pick: Qwen4 is ahead in both.

The other conditions:

  • Scoring is keyword-based, no LLM judge. The scorers are the ones from the NInfer post: keyword hits against the gold answer (AT1, AT1-DE, AT2), structure plus content (AT3), the score the run script wrote into the result file (AT4–AT6). That is why Claude Sonnet 4.6 ranks below Qwen4 on AT1 (65.6 against 72.4) in our table, but far above it on AT2 (94.8 against 86.3) — keyword hits reward verbatim identifiers, not judgment. Read the scores as “how many of the expected facts appear”, not as “how good a human would rate the answer”.
  • Settings Qwen4: temperature 0, thinking on (Ollama default). NumCtx 204800 for AT1–AT3, 4096 for AT4. AT1-DE is the exception: 27 of 30 tasks ran at 131072, because the AT1-DE script did not know the model and fell back to its default; the 3 reruns used 204800. The Qwen3.6 script default is thinking on as well, but we did not document it per run.

Where Qwen4 Failed — and Why We Are Not Sure

All six failures were on four test units, and one of them, Unit 1, shows up in every suite. It is not a size effect: Unit 1 is by far the smallest of the four*, so it is the question that is hard, not the file. Here is the rerun with the larger limit:

Task Output tokens (incl. thinking) Duration
AT2 Unit 1, Q130,751214 s
AT2 Unit 2, Q19,099118 s
AT2 Unit 3, Q34,979109 s
AT3 Unit 48,96659 s
AT1-DE Unit 17,92449 s (before: abort after 300 s)
VT9 phase 1, thinking on11,01484 s (before: 0/198 after exactly 8192 tokens)

*) Unit sizes: Unit 1 about 1,100 lines, Unit 4 about 5,300, Unit 2 about 6,400, Unit 3 about 12,200. The units are anonymised; they come from a real production code base.

The honest reading: with 8192 tokens, Qwen4 failed six times, with 32768 never. At least four times the limit demonstrably was too small (Unit 1 Q1, Unit 2 Q1, Unit 4, VT9). For the other two, Unit 3 Q3 (4,979 tokens) and AT1-DE Unit 1 (7,924), the need this time stayed below the old limit. So the earlier failures had another cause there. Probably the model was stuck in a thinking loop at that moment — that is not proven; the thinking text was not stored.

Practical consequence: Qwen4 thinks very long on hard questions — over 30,000 tokens, 3.5 minutes for Unit 1, Q1. Set num_predict generously (32768) and plan for long response times.

The VT pre-checks. The Qwen3.6 column comes from the earlier run, except for VT9 phase 1; we did not repeat the other VT pre-checks on the new Ollama.

Test Qwen4 Qwen3.6
VT2 (JSON fidelity)FAIL — no valid JSONPASS
VT3 (reproducibility)answers “RawByteString”PASS
VT9 phase 1, thinking on (198 MCP tool names)196/198: 94 exact, 76 semantic, 19 wrong; 84 snot run with thinking
VT9 phase 1, thinking off198/198: 56 exact, 115 semantic, 20 wrong; 13 s198/198: 53 exact, 115 semantic, 24 wrong
VT9 phase 2PASS 198/198PASS 198/198
VT5 alignment (exact matches)5931
VT6-C call chain (keyword hits)5/83/8
VT6-A / VT6-B10/10, 9/1010/10, 9/10
VT8-ext no-think / thinking3/5, 4/54/5, 3/5

VT9 phase 1 needs a word about fairness. The VT9 script switches thinking off automatically for qwen3* and gemma4 models, but not for Qwen4. Our first Qwen4 result (0/198, output cut at 8192 tokens) therefore compared Qwen4 with thinking against Qwen3.6 without. Fair comparison: without thinking the two are practically level (56/115/20 against 53/115/24). With thinking, Qwen4 is clearly better (94 exact), but six times slower (84 s instead of 13 s).


Speed — Qwen3.6 Is Faster

Both models on Ollama 0.40.21, same machine:

Suite Wall time Qwen3.6 Wall time Qwen4 tok/s Qwen3.6 tok/s Qwen4
AT1502 s887 s215142
AT1-DE463 s850 s17562
AT22,242 s4,140 s218152
AT3444 s459 s249189
AT4316 s220 s242130
AT5155 s70 s––
AT6308 s105 s––

Qwen3.6 generates tokens clearly faster (about 227 against about 143 tok/s on AT1, AT2 and AT4), and on AT1 to AT3 it also finishes sooner or equally fast (AT1 502 s against 887 s, AT2 2242 s against 4140 s). On AT4 to AT6, Qwen4 is done earlier (AT5 70 s against 155 s, AT6 105 s against 308 s). Presumably it thinks less there; we did not check that. So the honest summary is: Qwen4 is better, but not faster.

Caveats for the Qwen4 numbers:

  • Warm versus cold is a big difference with Qwen4. Cold runs were very slow, presumably because the PLE table is read from disk again; warm, the model generates 86–190 tok/s. The AT1-DE figure of 62 tok/s looks like such a cold run.
  • Ollama switches on MTP speculation automatically (draft-mtp, n_max 4) for Qwen4. The tok/s include that effect, and we did not measure the speed without it.

For the choice of context size, we ran a separate test, with bge-m3 loaded in parallel (our RAG embedding model): 204800 generates at 86.5 tok/s with 1277 tok/s prefill, 247808 only at 65.6 tok/s and 1113 tok/s. At 262144, the scheduler estimates 43.9 GiB and evicts bge-m3 on a cold start. So we chose 204800. We did not test full 256K operation.


A Correction We Owe You Again: “100 % GPU”

The NInfer post corrected the “100% GPU, no CPU offload” claim of the KAT-Coder post. Qwen4 needs the same care. ollama ps shows 100% GPU. The Ollama server log shows something more precise: the per-layer embedding table per_layer_token_embd — 13.4 GB — is mapped as CPU_Mapped in system RAM. “No CPU offload” is therefore true for the weights and the KV cache in the usual sense, but not for this table. If you size a machine for this model, count the 13.4 GB of RAM in addition to the VRAM. We say this plainly because the status line alone would give you a wrong picture.


Two Bugs In Our Own Harness

The first Qwen4 run was done in Windows PowerShell 5.1, and it produced garbage that looked like model failure:

  • 19 of 30 AT1-DE requests were rejected with invalid character after object key. The scripts sent the JSON body as a string, so the umlauts were wrongly encoded.
  • VT9v2 aborted with a parse error because the script had been saved without a BOM. After fixing that, phase 1 first covered only 104 of 198 tools, because three servers have special characters in their tool descriptions. After the second fix: 198 of 198.
  • -SkipExisting also skips empty error files. Six empty files had to be moved away and rerun by hand.

All of this was fixed (UTF-8 bytes, BOM) and rerun; the numbers above come from the clean runs. A harness bug looks exactly like a weak model, and we only saw the difference because 19 rejections out of 30 were implausible. The Ollama-version effect and the VT9 thinking switch described above are the same kind of trap, only quieter: nothing failed; the comparison was simply not level.


The Full Ranking

All values 0–100, errors as 0, mean only over all seven tests. Only the two Qwen rows marked “same Ollama” were measured on the same Ollama version. The other models were measured earlier, on older Ollama versions or other engines, and the Qwen3.6 re-measurement shows that this can be worth several points.

# Model AT1 AT1-DE AT2 AT3 AT4 AT5 AT6 Mean tok/s
1qwen4:35b-a3b (same Ollama, limit 32768 on 6 tasks)72.456.886.384.083.698.684.480.9143
2qwen3.8:27b-q4_K_M63.649.775.185.380.2100.080.676.445
3NInfer qwen3.8-27b int8 no-think62.836.271.782.382.099.681.773.7100
4NInfer qwen3.8-27b nvfp4 no-think61.336.167.980.982.6100.081.772.984
5NInfer qwen3.6-35b-a3b50.939.867.378.784.6100.080.071.6481
6qwen3.6:35b-a3b (re-measured, same Ollama)47.043.864.877.882.4100.077.870.5227
7qwen3.6:27b37.138.056.569.480.8100.077.865.741

tok/s: mean generation rate from AT1, AT2 and AT4. Models that were not run on all seven tests — among them KAT-Coder, gemma4:26b, devstral and Claude Sonnet 4.6 as a reference — get no mean in the full table and are left out here.

Two readings of the table:

  1. Qwen4 improves on the same weight class. It has the same 35b-a3b designation as Qwen3.6, and the same fits-on-one-GPU footprint (with the RAM caveat above). The generation change is worth about 10 points on our mean, measured on equal footing. Part of the gap to the older rows (qwen3.8:27b, the qwen3.6:27b row) may be an Ollama-version effect, because we did not re-measure them.
  2. NInfer on Qwen3.6 is still the fastest by far (481 tok/s). We have not run Qwen4 on NInfer. Whether the engine gain of the NInfer post carries over to this model is an open question — not something we can claim. Note also that Ollama alone has just closed a good part of that gap for Qwen3.6 (143 → 227 tok/s).

What This Means in Practice

If you use qwen3.6:35b-a3b for code comprehension, question answering over Delphi units or patch generation, Qwen4 is worth considering: about +6 to +25 points on keyword scoring. For classification and routing (AT4 to AT6) there is little to gain. But it costs you generation speed (about 143 instead of 227 tok/s), and it thinks for a very long time on hard questions.

What you need to plan for: set num_predict generously (we used 32768 for the hard cases), allow long response times (3.5 minutes for the hardest unit), and use a timeout well beyond 300 seconds. Where a task does not need deep reasoning, switch thinking off — on the tool-name task that costs little in quality and is six times faster. Count 13.4 GB of system RAM on top of the VRAM.

And the cheapest improvement is not a new model at all: update Ollama. The same Qwen3.6 got about 60 % faster and 4.6 points better.

What this post does not claim:

  • That Qwen4 is better in the eyes of a judge. All scores are keyword hits. Claude Sonnet 4.6 stays far ahead on AT2 (94.8 against 86.3), and a human would rate the answers differently than a keyword counter does.
  • That Qwen4 is better as a RAG chat model. The 555-question GV-Chat run — the one that corrected our own 60-question impression in the KAT-Coder post — has not been done for Qwen4. We have no data on it, and that earlier post showed how misleading a quick impression can be on exactly this point.
  • An equal frame on the six rerun tasks. Qwen4 got 32768 tokens there; Qwen3.6 got 8192. Qwen3.6 never reached its limit, so we do not expect a difference, but we did not rerun it.
  • Why exactly Qwen4 failed at 8192. In four of six cases the limit demonstrably was too small. In two it was not; a thinking loop is our guess, not a finding.
  • Comparability with earlier parts. The numbers of the earlier posts come from older Ollama versions and are only loosely comparable with these.
  • Why the Ollama update helps. Backend, MTP speculation — both are guesses.
  • That the speed difference is final. Qwen4 runs with automatic MTP speculation, cold starts swing widely, and we did not measure the speed without speculation.
  • Full 256K operation. We chose 204800; the knock-out criterion was 262144.

The next sensible steps are the 555-question RAG run and Qwen4 on NInfer.


Note on the Use of AI: This article was created with the "assistance" of generative AI. The content, technical statements, and conclusions have been reviewed and revised by the author. The author bears full responsibility for the publication.



Wednesday, November 18, 2026

FLStore: An Encrypted Storage Engine for Delphi!

SQLite is the default answer whenever a Delphi application needs local storage, and for good reason. But many applications never actually need SQL. They store records, find them again by key or by index, and on mobile devices they need to keep that data encrypted. For exactly this job we built FLStore: a page-based CRUD storage engine that plugs into our TVectorDB interface, with encryption built in. This post explains how the engine works, how it performs against SQLite (with and without encryption), and how we tested it.




One Interface, Three Drivers

TVectorDB is our table-oriented data layer. The model is a plain Delphi record with attributes; TFLVectorTable<T> reads and writes it through the IFLTableStore interface. Behind that interface there are three drivers. The MySQL and SQLite drivers generate SQL. The third one, FLStore (TStorageTableStore), is a storage engine of our own with no SQL anywhere. The application code is the same for all three.

The model attributes and nullable types come from our FDK. A minimal example:

type
  [VectorTable('customers')]
  [VectorIndex('City')]
  TCustomer = record
    [DBField(true, 32)] GUID : string;
    [DBField(26)]       Name : string;
    [DBField(29)]       City : string;
  end;

var
  lStore    : IFLTableStore;
  lCustomer : TCustomer;
  lTx       : IFLVectorTransaction;
begin
  lStore := TStorageTableStore.Open('customers.fls');  // encrypted: Open(FileName, KeyMaterial)
  lStore.EnsureTable(TFLModel<TCustomer>.Schema);

  lCustomer      := Default(TCustomer);
  lCustomer.GUID := 'G1';
  lCustomer.Name := 'Miller';
  lCustomer.City := 'Boston';
  TFLVectorTable<TCustomer>.Construct(lStore).Create(lCustomer);  // autocommit

  lCustomer := TFLVectorTable<TCustomer>.Construct(lStore).Read('G1');

  lTx := lStore.BeginTransaction;
  TFLVectorTable<TCustomer>.Construct(lStore).Update(lCustomer);
  lTx.Commit;

  // Queries: TFLVectorTable<TCustomer>.Construct(lStore).Query.OrderBy('GUID').ToArray
end;

The same code runs unchanged against the SQLite or MySQL driver. Moving from SQLite to FLStore means changing a single line: the store you open.


Why Drop the SQL Text Layer?

With an SQL driver, every single operation takes a detour. The driver builds an SQL string, the database parses it and plans it, parameters are bound, and the result columns are converted back into record fields. For an application that only stores and retrieves records, all of that is overhead. In FLStore the record passes through a field table that is registered once and goes directly into the row format. Searches are structured conditions, not text.

How little overhead remains shows up in a sampling profile of a single insert with commit (Win64). Roughly three quarters to four fifths of the time is spent in the one WriteFile call that appends the commit to the journal. The engine code itself accounts for about 5%. What is left is essentially the cost of the storage hardware.


Under the Hood

  • File layout: one main file, two alternating journals and a double-write area. Data pages are 16 KB and are grouped into segments of 64 pages. B+-tree index pages live in a shared index region at the front of the file.
  • Redundant metadata: two header slots and two copies of the segment table. On open, the valid header with the higher sequence number wins.
  • One file format everywhere: little endian with fixed sizes, so the same file works on Win32, Win64, Android64 and iOS64.
  • Schema evolution for free: each value in a row is stored with its column id and type. A new column gets the next id, and old rows read it as NULL. ADD COLUMN never rewrites a single row.
  • Indexes: a primary-key tree plus secondary indexes ([VectorIndex]), composite ones included. They support equality on the leading columns, ranges and "starts with" on the next one, IN lists, and ORDER BY straight from the index order.
  • Commits: a commit appends the changed pages to the active journal as delta frames (only the bytes that changed) in one write call. A background thread syncs the journal once per second and copies a full journal into the main file (checkpoint). Because the two journals alternate, a commit never waits for a running checkpoint.
  • Crash safety: a killed process loses nothing. A power loss can cost at most roughly the last second, and in both cases the file stays consistent. The double-write area protects against torn pages during a checkpoint.
  • Threading: one instance per file and process, and every method runs under the instance lock. A transaction belongs to its thread, and other threads never see uncommitted rows.

Encryption Built In, Not Bolted On

Encryption in FLStore is not a layer on top. It is part of the page format. A page is encrypted wherever it leaves memory: in the main file, in the journal including its delta payloads, and in the double-write area.

  • A key per file: every file has its own random 256-bit data key, stored wrapped in the file header. A check value detects a wrong key the moment the file is opened.
  • Crash-safe by design: every page version is encrypted with its own unique parameters, and these are never reused, not even across crashes.
  • Changing the key costs almost nothing: only the data key in the header is rewrapped, and no page is rewritten. Re-keying a large file takes the same time as re-keying an empty one.
  • Only what is read gets decrypted: the engine decrypts in small blocks and touches only the bytes a read actually needs, instead of decrypting whole 16 KB pages.

The Test Setup

All numbers were measured on 18 November 2026 on a real, mid-range Android phone, not on a developer workstation. All configurations run in the same benchmark app, from a single build, through the same TVectorDB layer and on the same data:

ParameterSQLiteFLStore
DeviceSamsung Galaxy A15 (SM-A155F), Android 16 / API 36
BuildDelphi 13.2, Android64, Release
Data140,000 rows; Int64 key, 52 text columns of 48 characters each, two secondary indexes; plus a small table for single inserts
EngineSQLite 3.42.0 (FireDAC, statically linked)FLStore, current version
Encryptionnonemeasured both off and on
Durabilityjournal_mode=WAL, synchronous=NORMAL: no fsync per commitno fsync per commit, journal synced about once per second
Cache32 MB32 MB
Runsmean of 4 runsmean of 2 runs per mode (order: off, on, on, off)

Each run has three rounds, and the reported value is the median per operation. Both engines are configured for the same durability class: consistent after every crash, with neither forcing an fsync on every commit. The details differ: FLStore limits the window of possible loss to about one second, while SQLite syncs its WAL at checkpoints. SQLite has no built-in encryption, so it appears only unencrypted.


The Numbers

Time per operation in µs (lower is better). The factor in brackets is SQLite divided by FLStore, so a higher factor means FLStore is faster:

OperationSQLite (unencrypted)FLStore (unencrypted)FLStore (encrypted)
Batch insert (1,000 per transaction), per row153.747.5 (3.2x)65.9 (2.3x)
Read by key283.263.1 (4.5x)81.1 (3.5x)
Range of 100 rows5,7293,956 (1.4x)4,668 (1.2x)
Equality via secondary index2,4142,015 (1.2x)2,130 (1.1x)
Full scan, per row45.325.0 (1.8x)31.8 (1.4x)
Single update with commit (total)1,199.2182.8 (6.6x)314.7 (3.8x)
  – median commit619.6113.0 (5.5x)210.6 (2.9x)
  – p99 commit1,901.4186.0 (10.2x)385.8 (4.9x)
Single insert with commit (total)138.023.3 (5.9x)27.6 (5.0x)
  – median commit100.421.8 (4.6x)25.1 (4.0x)
  – p99 commit292.559.4 (4.9x)74.7 (3.9x)
Open database1,087499 (2.2x)634 (1.7x)
File size after close178.7 MB174.3 MB174.3 MB

Unencrypted against unencrypted, FLStore is faster in every case, between 1.2x and 6.6x, and up to 10x on the p99 commit. Even with every page encrypted, FLStore stays ahead of unencrypted SQLite in every case, between 1.1x and 5.0x. The biggest advantage shows up where interactive applications actually spend their time: small transactions with their own commit. The tail latency matters most for a responsive UI. Even encrypted, the p99 commit of a single update is 0.39 ms with FLStore, compared with 1.9 ms for SQLite.

The slowest single commit per round (at a journal switch or checkpoint) is a one-off event that varies a lot from run to run. It is therefore not listed in the table; median and p99 are the reliable figures. For the record: the slowest single update commit stayed below 9 ms in all FLStore runs, against roughly 80 to 90 ms for SQLite. The slowest single insert commit was 0.25 ms unencrypted and 0.36 ms encrypted, against 30 to 41 ms for SQLite.

What Encryption Costs

Comparing the two FLStore columns shows the price of encryption directly. It is highest on writes: the median commit of a single update goes from 113 µs to 211 µs, and batch inserts from 48 µs to 66 µs per row. On reads it is under 30% (63 µs to 81 µs per read by key), thanks to decrypting only what is actually read. The file size is identical with and without encryption.

For Reference: SQLite With Default Settings

The table above uses a tuned SQLite (synchronous=NORMAL, 32 MB cache), because that puts it in the same durability class as FLStore. An application that simply opens SQLite with the defaults of the FireDAC build gets different commit times. Same device, same benchmark, two further runs:

Operation (µs)SQLite, defaultsSQLite, WAL + NORMAL + 32 MB
Batch insert, per row157.5153.7
Read by key281.2283.2
Full scan, per row45.245.3
Single update, median commit3,319.9619.6
Single update, p99 commit4,523.91,901.4
Single insert, median commit421.4100.4

Reads, scans and batch inserts are practically unchanged (within ±2%), so the larger cache brings nothing measurable at this data size. Single commits, however, are 4.2x to 5.4x slower at the median with the defaults. The timings are consistent with an fsync on every commit, which is a stricter durability class than FLStore's. These numbers show what an application gets out of the box, but they are not an equivalent comparison. That is why our headline figures use the tuned configuration.


How We Tested: The Part That Matters Most

Writing your own storage engine is easy to claim and hard to trust. That is why the speed figures are the smaller half of this post. A database is only worth using if it gives back exactly what was committed, after every kind of failure. Here is what stands behind FLStore.

1. Correctness first: 575 engine tests, green on Win32 and Win64. The DUnitX suite of the storage engine covers the file format, header A/B fallback, damaged tables and pages (CRC errors, wrong page numbers), journal scans with a torn or damaged tail, open transactions, recovery after a killed process, double-write, the background checkpoint, encryption (including known-answer tests against the published reference vectors), backup and restore, and multiple threads and handles on one file. All 575 tests pass on both Win32 and Win64.

2. Fault injection: a crash at every single write. We don't test "a crash somewhere". Dedicated tests simulate a crash at every write operation: the simulated crash writes only part of the data and aborts, the file is reopened, and the test checks that exactly one committed state is present. This runs for the commit path, the background checkpoint and the first write after open, both unencrypted and encrypted.

3. Red-green proof for every fix. A test that passes proves nothing if it would also have passed without the fix. For every bug fix, our tooling (delphi__red_green_check) reverts the production change in a throwaway copy, keeps the new test and runs the build. The test must turn red without the fix and green with it. Otherwise it does not test what it claims to test.

4. Tested in a real application. The first production application on FLStore brings its own suite of 925 DUnitX tests, a large share of which exercise its repositories on top of the engine. They check that IDs are never handed out twice (not even after a Clear), that deletes really delete, that key changes work, that NULL stays distinct from 0.00, and that everything survives a reopen.

5. A fair benchmark, by construction. The benchmark app (an FMX program) measures all configurations in the same process, one after the other on a background thread. The order alternates every round, so no configuration always gets the cooler device. The input is identical for all: a fixed random seed and a prebuilt text pool. Timing uses TStopwatch, and the report gives the median per operation, plus median, p99 and maximum of the individual commits for the commit cases. Every round starts on a fresh file, the screen is kept on, and partial results are written after each round so that an aborted run loses nothing.

6. SQLite as the control group. SQLite runs in every pass. Because its code never changes, it serves as a control: if its numbers drift between runs, the device is the cause and the run is not valid. Engine optimizations are verified in A–B–B–A order with a fresh install for every run, so that a warm or cool device cannot fake a gain.

7. Verify the result, not just the clock. After reopening, the benchmark checks that the file really contains all rows. If anything does not add up, the run aborts instead of printing an attractive number. A benchmark that stops is worth more than one that flatters.

8. Clean conditions or no numbers. Measurements are only accepted on an idle machine, and the background load is logged for every run. Measurements taken under load are discarded and repeated. Each optimization was found with a sampling profiler (one sample every 250 µs, resolved through the map file) and then measured on its own.

9. Long enough to see the truth. Effects that involve the background checkpoint only show up in long runs. 10,000 single updates were not enough to make one optimization visible; with 100,000 updates it was clear (168 → 106 µs per update). Short benchmarks can hide exactly the behaviour that matters in production.


Tooling

FLStore was developed with our own Delphi infrastructure: the FDK for the model attributes, nullable types and base classes, and a backend with 33 MCP servers. DelphiMCP builds every target (Win32, Win64, Android64, plus the benchmark app against any engine version), runs the unit tests and performs the red-green check. PlanMCP (MySQL-backed) keeps tasks and decisions, and hgMCP handles version control. Development and on-device measurement ran in parallel and were coordinated agent-to-agent. A complete benchmark series on real hardware takes about an hour, with no manual build or deployment steps.


Conclusion

If an application stores records rather than running ad-hoc SQL, the SQL text layer is a cost it pays on every call. FLStore removes that layer. In the same durability class it is up to 6.6x faster than SQLite, and with every page encrypted it is still up to 5.0x faster than unencrypted SQLite, with slightly smaller files and a much shorter commit tail. Because it sits behind the TVectorDB interface, switching is a one-line change.

Numbers like these are only worth something if you can trust how they were made. Hundreds of tests, a simulated crash at every write, red-green proof for every fix, alternating run orders with SQLite as the control group, and clean measuring conditions: that is the foundation FLStore stands on.


Note on the Use of AI: This article was created with the "assistance" of generative AI. The content, technical statements, and conclusions have been reviewed and revised by the author. The author bears full responsibility for the publication.


Thursday, October 22, 2026

ISOlDE Gameengine: What an Experienced Developer Can Achieve in Three Days With AI

A game engine with its own IDE, a sprite editor, a shader graph and hot reload — all in Delphi, all in a few days. This post is about the engine, but even more about what makes such speed possible: frameworks, a backend of cooperating MCP servers, and a plan database that never forgets.

Meet ISOlDE — a Game Engine Written in Delphi

On 25 September 2026 I started a new repository. On 28 September, version 0.5.0 of ISOlDE was there: an isometric 2.5D game engine with its own IDE, both written entirely in Delphi. Direct3D 11 renderer, sprites with per-pixel depth images for the terrain, meshes with GPU skinning for characters and objects, dynamic light with a time of day, weather, fire, smoke, water and fog. And the game code itself is Delphi: the IDE compiles it into a DLL and swaps it into the running game every time I press save.

The whole thing is not built on a foreign engine and not on a foreign scripting language. It stands on frameworks I have developed over the years, and that is exactly why it could grow so fast.

The Foundation: FDK, #D.MVVM and the FMX Code Editor

  • FDK — my Delphi framework with well over 100 units. It carries everything an application needs below the user interface, and the engine and the IDE both use it. More on the FDK.
  • #D.MVVM — the MVVM framework for Delphi. The IDE with its docking windows, panels and plugins is built on it, so every tool window has a clean view model that can be tested without a user interface. The story of D.MVVM.
  • FMX code editor — my own FireMonkey implementation of a source code editor in the style of SynEdit. The game code is edited right inside ISOlDE, and a press on save triggers compile and hot reload.
  • FMX ribbon controls — the ribbon of the IDE, including tabs and customisable key bindings (Delphi, CUA or empty preset).

Four building blocks, and every one of them already existed. An agent that gets a clear, well-tested framework does not have to invent a user interface layer, a docking system or an editor first. It uses them — and produces code that fits.

The Real Secret: 33 MCP Servers That Work Together

Several Claude instances worked on ISOlDE at the same time. That is only possible because of my backend server concept: today, 33 MCP servers interact with each other through one central backend. A proxy in front of it hands every agent exactly the tools it needs — compiler, source index, tests, search, Word, mail, Blogger, ffmpeg, and so on. Agents find each other, ask each other questions, wake each other up, and lock a unit when they are about to change it, so two of them never write into the same file.

Compiling does not happen through a hand-typed command line but through DelphiMCP; searching a code base of several hundred thousand lines goes through an index instead of a blind grep. This is the part that turns "an AI that types code" into "a team of agents that delivers". The modules are available as Delphi source code — see the MCP page.

I don't think I need to mention this specifically, do I? Of course, the game engine has its own MCP server so that agents can start working with it right away and create games with minimal effort. Many years ago, I programmed a Pac-Man* clone in FMX and had already fully implemented the game logic here. Claude rewrote the game in no time using the built-in MCP server in the backend.

*) - original © by Namco -

PlanMCP: Organisation in a Database, Not in Markdown Files

Most agent setups keep their plans in Markdown files that someone has to maintain, merge and re-read. Mine does not. PlanMCP stores tasks, features, decisions, and handovers in a MySQL server. Any agent can ask: What is open? What is blocked? What did the last session hand over? When I clear a session, the next one picks up exactly where the last one ended — with an append-only history, not with a text file that may be out of date.

For ISOlDE this meant 166 tracked features, each with a status, and a plan that all agents see in the same state at the same moment. With several agents working in parallel, that is not a nice-to-have. It is the difference between coordination and chaos.

A PAServer for Games: IDE in the VM, Game on the GPU

I work inside a VMware virtual machine, and a VM has no real GPU. A game engine needs one. So I took the idea behind Delphi's PAServer and applied it to games: the IDE runs in the VM, and a small runner runs on the Windows host, where the RTX 5090 sits. The runner listens in the local network and authenticates the IDE with a shared token. It idles without a Direct3D device and only starts rendering when it is told to run.

  • F9 builds and starts the game locally for debugging.
  • Shift+F9 builds the release, deploys it from the VM to the host (about 117–128 MB/s over the LAN), loads the game DLL and hot-reloads it — while the game keeps running.
  • The IDE even brings the host runner up to date by itself, and a health call reports its build and protocol version.
  • A command-line tool, IsoCtl, offers the same commands to scripts and agents: run, stop, stats, capture, deploy, update.

The result: the comfort of working in a VM and the speed of real hardware. On the host, a borderless 4K window with one million sprites runs at about 550 fps, and the volcano island scene at over 1,000 fps.

Screenshots and 4K/60 Demo Videos, Straight From the GPU

A game engine needs pictures. IsoCtl capture fetches the current frame from the host in full resolution (4K included), so agents and I always look at the real GPU image, not at a screen grab of the VM.

For videos, the runner records itself, and it does so properly. No screen capture, no wall clock: a fixed time step of 1/fps, vsync off, and every single frame is read directly from the GPU interface and handed to ffmpeg — with hardware encoding (NVENC for h264, hevc or av1) or libx264. The result is a demo video in 4K at 60 fps (the frame rate can be set from 1 to 240), rendered faster than it plays back.

The ffmpeg part is, of course, one more server in the backend: an ffmpeg MCP server installed on the GPU machine itself. That is where the frames are, so nothing has to travel over the network before it is encoded. An agent can record a scene, cut it and post-process it with a few commands, instead of me spending an evening with a screen recorder.

What Happened, Day by Day

DayRevisionsResult
25.09. (start)20New repository, resources imported, runner without Direct2D, monitor selection, full screen
26.09. (day 1)35IDE with docking, game DLL with hot reload, content store, scene designer with undo, FBX characters with GPU skinning
27.09. (day 2)108Shader graph with HLSL generation, flowing water and lava, sprite import, FBX models in scenes, plugin API, sprite editor as a plugin
28.09. (day 3)113Plugin host, sprite editor as a standalone application, depth images for sprites, dynamic light with time of day, version 0.5.0

276 revisions in four calendar days. On the last day, the volcano island demo already had wind-blown grass, bridges, flowing lava and smoke — once the tools exist, building a scene with them is the fun part.

Why It Goes This Fast

  • Parallel agents with a fixed contract. Each agent has its own files and a precisely described interface. The merge commits in the history show that several of them really were working at the same time.
  • Test first, then the core. Calculation kernels get their unit tests before the implementation, which gives the agent a solid feedback loop.
  • Experience that steers. 45 years of development decide the architecture, the order and the acceptance. The agents do the typing, the porting and the research across many files — and this is where the hours disappear.
  • Looking at the result. A short look at the screen finds what no test catches. An animated fox that kept rendering in the editor, a splash screen that waited too long — found, fixed, and turned into a rule or a test.

FBX to 2.5D Sprites, Sprite Editor and Mesh Editor

FBX import: my own FBX importer reads static models as well as animated characters. Whole model kits (Kenney, CC0) stand in the isometric scene as real 3D objects, lit together with the 2.5D sprite world, and an animated fox runs with GPU skinning of up to 256 bones. And the importer is also the way into the 2.5D world: FBX models are baked into 2.5D sprites with depth image and normals. That is how the bridges on the volcano island were made — a 3D model goes in, a sprite that sorts and lights correctly in the isometric scene comes out. Because every sprite carries its depth and normal channels, flat 2.5D sprites and real 3D meshes can live side by side in the same scene.

The sprite editor is a result of those first days: it paints in isometric planes, supports surfaces with normals for dynamic light, patterns, layers and directions, and it runs either as an IDE plugin or as a standalone SpriteEditor.exe. Shader effects such as torches, geysers and lava can be baked into looping sprite sheets.

The mesh editor followed shortly after on the same plugin API, and it bakes depth images from points and meshes into sprites. A nice proof that a clean plugin interface pays off — a new tool is a plugin away.

A tip from daily practice: the AI verifies against what it can see. When the mesh editor was checked through the CPU drawing path while I looked at the GPU view, we found and fixed a silent fallback on window resize — and now the screenshot function captures the real GPU views. Give the agent the same view the human has.

A Local Assistant for the Tedious Part

Not every job needs the biggest model. ISOlDE has a local agent panel running qwen3.8 on my own hardware. It takes over bulk work: assessing an imported tile set, suggesting roles and semantics, generating maps. Assigning roles to tiles worked 12 of 12 times; for edges and orientation geometry, code takes over, because code simply measures better than a model estimates. A larger model is used only for acceptance. Local model for volume, code for what can be calculated, big model for judgement.

ISOlDE Today

MeasureValue (22.10.2026, four weeks in)
Revisions1,333
Delphi source files847 files, about 622,000 lines
DUnitX tests3,574, all green, no leaks
Shader graphroughly 300 nodes
Frame rateover 2,000 fps on an RTX 5090 without optimisation (target: 400 fps as reserve)

What an Experienced Developer Can Achieve in Three Days

A lot. A running game engine with IDE, editors, FBX-to-sprite import, a host runner on the GPU, hot reload, and 4K/60 demo videos — because the pieces fit together: FDK and #D.MVVM as the foundation, the FMX editor and ribbon as the building blocks, 33 MCP servers as the workshop, and PlanMCP as the memory that keeps the whole team on the same page.

Delphi plus AI does not mean writing less. It means being able to build much more — as long as the framework and the infrastructure around the agents are right.

ISOlDE is in active development. Screenshots, the feature list, and a trial are on delphiprofi.de/isolde, and the frameworks and MCP modules behind it are on delphiprofi.de.


Note on the Use of AI: This article was created with the "assistance" of generative AI. The content, technical statements, and conclusions have been reviewed and revised by the author. The author bears full responsibility for the publication.