Performance
Purpose-built scripts and the TKTail workflow
Historical benchmark — TKTail 1.1.0 Measured on TKTail 1.1.0 (commit aa57462840, Release - Shipping PGO fc87e24fd604) on 2026-11-06. Superseded by competitive-bench-v2 (Historical benchmark — TKTail 1.3.0-rc.1). The current release is TKTail 1.2.1; the release candidate in testing is TKTail 1.3.0-rc.6. The current run: v2, the same work, level by level.
How long common production-log questions take - and how much data has to move - with the complete TKTail workflow (a search session that keeps its results pageable, records where every result came from and answers over MCP), and with competent PowerShell, C# and Python programs written to answer each question and nothing more, on the same bytes. Every implementation first had to produce the correct answer; then it was timed.
Every comparison is reproducible: the exact PowerShell, C# and Python source used for each measurement is published here, with the dataset generator, the orchestration and the raw results. These are concrete implementations on one machine - not a ranking of programming languages.
v1: the purpose-built run - this page. v2: the same work, level by level - every implementation doing the same work, every answer checked equal, TKTail measured as its engine; the product workflow apart (TKTail 1.3.0-rc.1, a release candidate).
- Download benchmark source codeTKTail-Competitive-Benchmarks-competitive-bench-v1.zip · 49.4 KB · SHA-256
9b70ca6d1fe19a2460174db61b2eeae50b17120929603e894a72785d41c7dec2 - Download raw resultsTKTail-Competitive-Benchmark-Results-competitive-bench-v1.zip · 558.8 KB · SHA-256
a87f895d877833bb62cab7701c25ddce6ba9f60491e1a0cd285f7f2a5220b50f - Methodology · View the source · Machine-readable index
What was measured
- Suite
- competitive-bench-v1 (source commit
5b90abb664) - TKTail
- TKTail 1.1.0 - build: Release - Shipping PGO fc87e24fd604; TKTail.exe SHA-256
a2de4d102dd8e2bf635f216b0bcd2491789625cb7ed993caa206cf2e906d87cd - Build
- TKTail 1.1.0 (stable release, superseded), commit
aa57462840, Release - Shipping PGO fc87e24fd604; measured 2026-11-06 - Historical benchmark — TKTail 1.1.0 - Machine
- Intel(R) Core(TM) i9-14900F, 24 cores / 32 logical, 191.8 GB RAM
- Windows
- Microsoft Windows 11 Pro, build 26300
- Storage
- Samsung SSD 980 PRO 1TB (NVMe, NTFS) - the OS file cache warm in every run
- Security software
- Norton 360, Windows Defender
- Load
- a development desktop with other applications running - the rotated order and the medians reduce their influence, they do not remove it
- Runtimes
- .NET SDK 10.0.403 · Python 3.13.0 (CPython) · PowerShell 7.6.9 and 5.1.26100.9818
- C# (.NET 10) - C# - .NET 10, Release x64, streaming byte spans (csharp/Program.cs) View source
- Python (CPython) - Python - CPython, standard library, streaming (python/bench.py) View source
- PowerShell 7, streaming - PowerShell 7 - optimized streaming (powershell/bench.ps1) View source
- Windows PowerShell 5.1, streaming - Windows PowerShell 5.1 - optimized streaming (powershell/bench.ps1) View source
- PowerShell 7, idiomatic pipeline - PowerShell 7 - idiomatic pipeline, a convenience baseline (powershell/idiomatic.ps1) View source
Correctness first
Each answer was compared with the ground truth the dataset generator wrote with the data; only correct answers were timed.
| Scenario | Dataset | C# (.NET 10) | Python (CPython) | PowerShell 7, streaming | Windows PowerShell 5.1, streaming | PowerShell 7, idiomatic pipeline |
|---|---|---|---|---|---|---|
literal-error | applog-1gb | OK | OK | OK | OK | OK |
elapsed-ge-1000 | applog-1gb | OK | OK | OK | OK | OK |
count-5xx | iis-1gb | OK | OK | OK | OK | OK |
count-slow | iis-1gb | OK | OK | OK | OK | - |
top-ip-5xx | iis-1gb | OK | OK | OK | OK | OK |
top-uri-5xx | iis-1gb | OK | OK | OK | OK | - |
per-minute-5xx | iis-1gb | OK | OK | OK | OK | OK |
top-ip-503-post | iis-1gb | OK | OK | OK | OK | - |
Results
Medians of the measured runs (minimum - maximum beside them); lower is better. Cold: one process per question - start, read, answer, exit (TKTail: start the window with the file, ask over MCP).Warm: the question repeated in a running process (TKTail: the file open and indexed). The ratio column is each implementation's median divided by TKTail's.
What this benchmark measures: execution after each implementation already exists. The C#, Python and PowerShell programs are purpose-built benchmark implementations - their source is written, their runtime and build tools installed, and each does exactly one question and nothing more; a purpose-built program can be very fast at one task. Writing, debugging, reviewing and deploying them is not in these numbers - the end-to-end AI benchmark measures that, with the data moved and the evidence kept. Neither excuses the other: where TKTail loses here, the reason is stated, not explained away - what TKTail does that the programs do not.
Not an engine comparison. On every question here TKTail does work the programs do not: it decodes each line to UTF-16 and validates it, frames logical records (multi-line application-log records, bounded giant lines), builds typed fields, keeps up to 5,000 results with their time and byte offsets for later pages, records the source's identity and answers through MCP; for elapsed-ge-1000 it runs a regular expression where the programs search for literal text. The programs split lines, read one or two fields and count. Both read the same bytes and both read the W3C #Fields header. The numbers below therefore compare a purpose-built program with the complete TKTail workflow. The engines doing the same work - raw reads, line framing, a literal search, a structured search, an aggregation - are measured by benchmark v2's levels: v2: the same work, level by level. What an investigation takes beyond execution - from a symptom to verified evidence, with these programs and with TKTail: the investigation workflow.
literal-error - applog-1gb
Count the lines containing the literal text ERROR (case-sensitive).
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 869 ms | 756 ms - 884 ms (5 runs) | 1235.2 | 1.17 s | 65.7 MB | 1x |
| C# (.NET 10) source | 482 ms | 470 ms - 520 ms (5 runs) | 2227.2 | 484 ms | 30.7 MB | 0.55x |
| Python (CPython) source | 2.90 s | 2.84 s - 2.98 s (5 runs) | 369.7 | 2.88 s | 21.3 MB | 3.34x |
| PowerShell 7, streaming source | 3.12 s | 2.78 s - 3.26 s (5 runs) | 344.1 | 3.28 s | 110.5 MB | 3.59x |
| Windows PowerShell 5.1, streaming source | 4.35 s | 4.18 s - 4.59 s (5 runs) | 246.9 | 4.33 s | 156.1 MB | 5x |
| PowerShell 7, idiomatic pipeline source | 3.84 s | 3.43 s - 4.06 s (5 runs) | 279.7 | 3.98 s | 108.1 MB | 4.42x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 418 ms | 405 ms - 433 ms (5 runs) | 2566.9 | 406 ms | 74.3 MB | 1x |
| C# (.NET 10) source | 332 ms | 300 ms - 361 ms (5 runs) | 3233.8 | 346 ms | 28.2 MB | 0.79x |
| Python (CPython) source | 2.86 s | 2.66 s - 3.11 s (5 runs) | 375.6 | 2.83 s | 21.4 MB | 6.83x |
| PowerShell 7, streaming source | 2.68 s | 2.52 s - 2.82 s (5 runs) | 401.4 | 2.72 s | 116.7 MB | 6.4x |
| Windows PowerShell 5.1, streaming source | 3.87 s | 3.58 s - 4.31 s (5 runs) | 277.5 | 3.96 s | 155.7 MB | 9.25x |
elapsed-ge-1000 - applog-1gb
Count the records whose "elapsed: <number>ms" is 1000 or more (the number read exactly; 1000.000 counts).
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 6.02 s | 5.53 s - 6.08 s (5 runs) | 178.3 | 6.41 s | 62.4 MB | 1x |
| C# (.NET 10) source | 876 ms | 818 ms - 889 ms (5 runs) | 1225.3 | 906 ms | 30.8 MB | 0.15x |
| Python (CPython) source | 3.16 s | 3.14 s - 3.30 s (5 runs) | 340.3 | 3.14 s | 21.2 MB | 0.52x |
| PowerShell 7, streaming source | 11.0 s | 10.6 s - 11.6 s (5 runs) | 97.8 | 11.3 s | 112.6 MB | 1.82x |
| Windows PowerShell 5.1, streaming source | 11.4 s | 11.2 s - 12.0 s (5 runs) | 94.6 | 11.4 s | 157.4 MB | 1.89x |
| PowerShell 7, idiomatic pipeline source | 28.3 s | 27.8 s - 29.2 s (5 runs) | 37.9 | 28.6 s | 111.9 MB | 4.7x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.26 s | 5.17 s - 5.69 s (5 runs) | 204.1 | 5.30 s | 74.3 MB | 1x |
| C# (.NET 10) source | 739 ms | 689 ms - 829 ms (5 runs) | 1453.2 | 763 ms | 28.3 MB | 0.14x |
| Python (CPython) source | 3.31 s | 2.96 s - 3.46 s (5 runs) | 324.5 | 3.26 s | 21.2 MB | 0.63x |
| PowerShell 7, streaming source | 10.8 s | 10.2 s - 11.5 s (5 runs) | 99.5 | 10.7 s | 118.3 MB | 2.05x |
| Windows PowerShell 5.1, streaming source | 10.7 s | 10.5 s - 11.1 s (5 runs) | 100.4 | 10.7 s | 157.3 MB | 2.03x |
count-5xx - iis-1gb
Count the requests with sc-status 500 or higher.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 6.10 s | 5.47 s - 6.62 s (5 runs) | 175.9 | 6.48 s | 62.3 MB | 1x |
| C# (.NET 10) source | 1.25 s | 1.21 s - 1.36 s (5 runs) | 860.5 | 1.28 s | 30.9 MB | 0.2x |
| Python (CPython) source | 4.73 s | 4.53 s - 5.11 s (5 runs) | 226.9 | 4.72 s | 21.2 MB | 0.78x |
| PowerShell 7, streaming source | 8.83 s | 8.28 s - 9.17 s (5 runs) | 121.6 | 9.05 s | 115.2 MB | 1.45x |
| Windows PowerShell 5.1, streaming source | 11.8 s | 11.6 s - 12.2 s (5 runs) | 90.8 | 11.9 s | 158.9 MB | 1.94x |
| PowerShell 7, idiomatic pipeline source | 98.1 s | 97.9 s - 100.6 s (3 runs) | 10.9 | 98.4 s | 111.8 MB | 16.07x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.36 s | 5.08 s - 5.49 s (5 runs) | 200.5 | 5.34 s | 74.3 MB | 1x |
| C# (.NET 10) source | 935 ms | 892 ms - 1.12 s (5 runs) | 1148.3 | 974 ms | 28.2 MB | 0.17x |
| Python (CPython) source | 4.63 s | 4.46 s - 5.28 s (5 runs) | 231.7 | 4.72 s | 21.2 MB | 0.87x |
| PowerShell 7, streaming source | 7.64 s | 7.59 s - 8.15 s (5 runs) | 140.5 | 7.86 s | 115.6 MB | 1.43x |
| Windows PowerShell 5.1, streaming source | 11.7 s | 11.2 s - 12.2 s (5 runs) | 91.9 | 11.7 s | 158.6 MB | 2.18x |
count-slow - iis-1gb
Count the requests with time-taken 1000 (ms) or more.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 12.4 s | 9.39 s - 13.8 s (5 runs) | 86.3 | 10.5 s | 62 MB | 1x |
| C# (.NET 10) source | 2.20 s | 2.02 s - 2.30 s (5 runs) | 487.3 | 1.72 s | 30.7 MB | 0.18x |
| Python (CPython) source | 9.97 s | 9.45 s - 10.3 s (5 runs) | 107.7 | 7.64 s | 21.4 MB | 0.8x |
| PowerShell 7, streaming source | 17.6 s | 16.9 s - 18.3 s (5 runs) | 61.1 | 14.0 s | 112.9 MB | 1.41x |
| Windows PowerShell 5.1, streaming source | 25.6 s | 24.9 s - 26.0 s (5 runs) | 41.9 | 20.1 s | 159.2 MB | 2.06x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.41 s | 5.23 s - 5.65 s (5 runs) | 198.6 | 5.44 s | 74.3 MB | 1x |
| C# (.NET 10) source | 964 ms | 939 ms - 1.11 s (5 runs) | 1114.2 | 1.01 s | 28.2 MB | 0.18x |
| Python (CPython) source | 4.66 s | 4.38 s - 4.87 s (5 runs) | 230.6 | 4.69 s | 21.2 MB | 0.86x |
| PowerShell 7, streaming source | 8.65 s | 8.34 s - 13.7 s (5 runs) | 124.1 | 9.18 s | 121.9 MB | 1.6x |
| Windows PowerShell 5.1, streaming source | 26.0 s | 25.4 s - 26.4 s (5 runs) | 41.3 | 20.3 s | 158.9 MB | 4.81x |
top-ip-5xx - iis-1gb
The 10 client addresses (c-ip) with the most requests with sc-status 500 or higher, with their counts.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 8.09 s | 6.24 s - 14.7 s (5 runs) | 132.6 | 8.31 s | 64.6 MB | 1x |
| C# (.NET 10) source | 1.39 s | 1.15 s - 2.42 s (5 runs) | 774.6 | 1.44 s | 32 MB | 0.17x |
| Python (CPython) source | 5.28 s | 4.74 s - 10.3 s (5 runs) | 203.3 | 5.23 s | 21.3 MB | 0.65x |
| PowerShell 7, streaming source | 9.91 s | 9.34 s - 20.1 s (5 runs) | 108.3 | 10.2 s | 116.4 MB | 1.22x |
| Windows PowerShell 5.1, streaming source | 12.9 s | 12.0 s - 30.4 s (5 runs) | 83 | 12.9 s | 163.5 MB | 1.6x |
| PowerShell 7, idiomatic pipeline source | 245.9 s | 104.0 s - 246.0 s (3 runs) | 4.4 | 185.6 s | 864.4 MB | 30.38x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.54 s | 5.39 s - 5.99 s (5 runs) | 193.9 | 5.52 s | 74.3 MB | 1x |
| C# (.NET 10) source | 2.03 s | 1.76 s - 2.13 s (5 runs) | 529.1 | 1.55 s | 30.2 MB | 0.37x |
| Python (CPython) source | 10.2 s | 9.88 s - 10.4 s (5 runs) | 104.8 | 7.93 s | 21.5 MB | 1.85x |
| PowerShell 7, streaming source | 18.5 s | 18.0 s - 18.7 s (5 runs) | 58.1 | 14.6 s | 127.6 MB | 3.34x |
| Windows PowerShell 5.1, streaming source | 29.1 s | 28.0 s - 29.6 s (5 runs) | 36.9 | 22.3 s | 163.3 MB | 5.25x |
top-uri-5xx - iis-1gb
The 10 URL paths (cs-uri-stem) with the most requests with sc-status 500 or higher.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 6.31 s | 6.03 s - 6.96 s (5 runs) | 170.1 | 6.80 s | 62.5 MB | 1x |
| C# (.NET 10) source | 1.30 s | 1.24 s - 1.38 s (5 runs) | 823.4 | 1.33 s | 31.9 MB | 0.21x |
| Python (CPython) source | 4.51 s | 4.26 s - 4.52 s (5 runs) | 238.3 | 4.48 s | 21.3 MB | 0.71x |
| PowerShell 7, streaming source | 8.87 s | 8.22 s - 8.92 s (5 runs) | 121 | 9.13 s | 116.1 MB | 1.41x |
| Windows PowerShell 5.1, streaming source | 12.2 s | 11.8 s - 12.8 s (5 runs) | 88.1 | 12.1 s | 163.3 MB | 1.93x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.76 s | 5.67 s - 6.01 s (5 runs) | 186.5 | 5.77 s | 74.7 MB | 1x |
| C# (.NET 10) source | 2.14 s | 2.09 s - 2.30 s (5 runs) | 501.5 | 1.62 s | 30 MB | 0.37x |
| Python (CPython) source | 10.1 s | 9.83 s - 10.3 s (5 runs) | 105.8 | 7.63 s | 21.3 MB | 1.76x |
| PowerShell 7, streaming source | 18.5 s | 18.1 s - 19.6 s (5 runs) | 58.1 | 14.6 s | 127 MB | 3.21x |
| Windows PowerShell 5.1, streaming source | 30.0 s | 29.7 s - 31.6 s (5 runs) | 35.8 | 23.0 s | 163.4 MB | 5.21x |
per-minute-5xx - iis-1gb
Requests with sc-status 500 or higher per minute (the W3C time is UTC), in time order.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 6.24 s | 6.14 s - 6.47 s (5 runs) | 172.1 | 6.67 s | 62.4 MB | 1x |
| C# (.NET 10) source | 1.28 s | 1.16 s - 1.41 s (5 runs) | 839 | 1.30 s | 32.2 MB | 0.21x |
| Python (CPython) source | 4.24 s | 4.01 s - 4.35 s (5 runs) | 253.3 | 4.20 s | 21.7 MB | 0.68x |
| PowerShell 7, streaming source | 8.98 s | 8.50 s - 9.19 s (5 runs) | 119.6 | 9.33 s | 116.3 MB | 1.44x |
| Windows PowerShell 5.1, streaming source | 12.7 s | 11.8 s - 12.8 s (5 runs) | 84.8 | 12.6 s | 162.5 MB | 2.03x |
| PowerShell 7, idiomatic pipeline source | 103.6 s | 102.8 s - 105.0 s (3 runs) | 10.4 | 103.7 s | 901.5 MB | 16.61x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.71 s | 5.37 s - 6.00 s (5 runs) | 188 | 5.56 s | 74.7 MB | 1x |
| C# (.NET 10) source | 2.03 s | 1.95 s - 2.08 s (5 runs) | 528.2 | 1.54 s | 31.7 MB | 0.36x |
| Python (CPython) source | 9.77 s | 9.34 s - 10.4 s (5 runs) | 109.8 | 7.36 s | 22.1 MB | 1.71x |
| PowerShell 7, streaming source | 19.1 s | 18.3 s - 19.7 s (5 runs) | 56.2 | 14.5 s | 127.3 MB | 3.35x |
| Windows PowerShell 5.1, streaming source | 30.1 s | 29.0 s - 31.1 s (5 runs) | 35.7 | 22.4 s | 162.3 MB | 5.26x |
top-ip-503-post - iis-1gb
The 10 client addresses with the most POST requests answered 503.
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 6.05 s | 5.85 s - 6.28 s (5 runs) | 177.5 | 6.42 s | 63 MB | 1x |
| C# (.NET 10) source | 1.27 s | 1.21 s - 1.34 s (5 runs) | 848.5 | 1.30 s | 31.9 MB | 0.21x |
| Python (CPython) source | 4.53 s | 4.36 s - 4.90 s (5 runs) | 237 | 4.52 s | 21.5 MB | 0.75x |
| PowerShell 7, streaming source | 8.95 s | 8.01 s - 9.41 s (5 runs) | 119.9 | 9.30 s | 116.3 MB | 1.48x |
| Windows PowerShell 5.1, streaming source | 12.3 s | 12.3 s - 12.9 s (5 runs) | 87 | 12.3 s | 163.8 MB | 2.04x |
| Implementation | Median | Min - max | MB/s | CPU | Peak memory | vs TKTail |
|---|---|---|---|---|---|---|
| TKTail (MCP) source | 5.11 s | 4.72 s - 5.17 s (5 runs) | 210.2 | 5.08 s | 75.3 MB | 1x |
| C# (.NET 10) source | 2.08 s | 2.02 s - 2.09 s (5 runs) | 516.1 | 1.55 s | 30.1 MB | 0.41x |
| Python (CPython) source | 10.5 s | 10.3 s - 11.1 s (5 runs) | 101.9 | 7.92 s | 21.7 MB | 2.06x |
| PowerShell 7, streaming source | 18.8 s | 18.0 s - 19.3 s (5 runs) | 57.1 | 14.8 s | 127.5 MB | 3.68x |
| Windows PowerShell 5.1, streaming source | 27.9 s | 27.0 s - 31.2 s (5 runs) | 38.5 | 22.5 s | 163.2 MB | 5.47x |
Scaling: 100 MB to 1 GB
The same questions, source and TKTail.exe on 100 MB logs (run 20261106T125130Z-competitive-bench-v1): each median on the smaller data, on the larger, and how many times longer the larger took. Ten times the data gives a factor near 10 when the time is spent reading; a smaller factor means a fixed cost - starting a process, a runtime, the window - weighs more on the small file.
| Scenario | Phase | Implementation | 100 MB | 1 GB | Factor |
|---|---|---|---|---|---|
literal-error | cold | TKTail (MCP) source | 1.61 s | 869 ms | 0.5x |
literal-error | cold | C# (.NET 10) source | 294 ms | 482 ms | 1.6x |
literal-error | cold | Python (CPython) source | 690 ms | 2.90 s | 4.2x |
literal-error | cold | PowerShell 7, streaming source | 1.55 s | 3.12 s | 2.0x |
literal-error | cold | Windows PowerShell 5.1, streaming source | 1.62 s | 4.35 s | 2.7x |
literal-error | cold | PowerShell 7, idiomatic pipeline source | 1.80 s | 3.84 s | 2.1x |
elapsed-ge-1000 | cold | TKTail (MCP) source | 2.56 s | 6.02 s | 2.3x |
elapsed-ge-1000 | cold | C# (.NET 10) source | 402 ms | 876 ms | 2.2x |
elapsed-ge-1000 | cold | Python (CPython) source | 770 ms | 3.16 s | 4.1x |
elapsed-ge-1000 | cold | PowerShell 7, streaming source | 3.14 s | 11.0 s | 3.5x |
elapsed-ge-1000 | cold | Windows PowerShell 5.1, streaming source | 2.76 s | 11.4 s | 4.1x |
elapsed-ge-1000 | cold | PowerShell 7, idiomatic pipeline source | 8.25 s | 28.3 s | 3.4x |
count-5xx | cold | TKTail (MCP) source | 2.21 s | 6.10 s | 2.8x |
count-5xx | cold | C# (.NET 10) source | 567 ms | 1.25 s | 2.2x |
count-5xx | cold | Python (CPython) source | 1.16 s | 4.73 s | 4.1x |
count-5xx | cold | PowerShell 7, streaming source | 2.80 s | 8.83 s | 3.1x |
count-5xx | cold | Windows PowerShell 5.1, streaming source | 3.10 s | 11.8 s | 3.8x |
count-5xx | cold | PowerShell 7, idiomatic pipeline source | 24.0 s | 98.1 s | 4.1x |
count-slow | cold | TKTail (MCP) source | 2.03 s | 12.4 s | 6.1x |
count-slow | cold | C# (.NET 10) source | 539 ms | 2.20 s | 4.1x |
count-slow | cold | Python (CPython) source | 1.11 s | 9.97 s | 9.0x |
count-slow | cold | PowerShell 7, streaming source | 2.55 s | 17.6 s | 6.9x |
count-slow | cold | Windows PowerShell 5.1, streaming source | 2.95 s | 25.6 s | 8.7x |
top-ip-5xx | cold | TKTail (MCP) source | 2.51 s | 8.09 s | 3.2x |
top-ip-5xx | cold | C# (.NET 10) source | 581 ms | 1.39 s | 2.4x |
top-ip-5xx | cold | Python (CPython) source | 1.05 s | 5.28 s | 5.0x |
top-ip-5xx | cold | PowerShell 7, streaming source | 3.15 s | 9.91 s | 3.1x |
top-ip-5xx | cold | Windows PowerShell 5.1, streaming source | 3.30 s | 12.9 s | 3.9x |
top-ip-5xx | cold | PowerShell 7, idiomatic pipeline source | 25.8 s | 245.9 s | 9.5x |
top-uri-5xx | cold | TKTail (MCP) source | 2.20 s | 6.31 s | 2.9x |
top-uri-5xx | cold | C# (.NET 10) source | 575 ms | 1.30 s | 2.3x |
top-uri-5xx | cold | Python (CPython) source | 919 ms | 4.51 s | 4.9x |
top-uri-5xx | cold | PowerShell 7, streaming source | 3.18 s | 8.87 s | 2.8x |
top-uri-5xx | cold | Windows PowerShell 5.1, streaming source | 3.28 s | 12.2 s | 3.7x |
per-minute-5xx | cold | TKTail (MCP) source | 2.44 s | 6.24 s | 2.6x |
per-minute-5xx | cold | C# (.NET 10) source | 526 ms | 1.28 s | 2.4x |
per-minute-5xx | cold | Python (CPython) source | 875 ms | 4.24 s | 4.8x |
per-minute-5xx | cold | PowerShell 7, streaming source | 2.73 s | 8.98 s | 3.3x |
per-minute-5xx | cold | Windows PowerShell 5.1, streaming source | 3.07 s | 12.7 s | 4.1x |
per-minute-5xx | cold | PowerShell 7, idiomatic pipeline source | 26.2 s | 103.6 s | 4.0x |
top-ip-503-post | cold | TKTail (MCP) source | 2.04 s | 6.05 s | 3.0x |
top-ip-503-post | cold | C# (.NET 10) source | 566 ms | 1.27 s | 2.2x |
top-ip-503-post | cold | Python (CPython) source | 916 ms | 4.53 s | 4.9x |
top-ip-503-post | cold | PowerShell 7, streaming source | 2.60 s | 8.95 s | 3.4x |
top-ip-503-post | cold | Windows PowerShell 5.1, streaming source | 3.16 s | 12.3 s | 3.9x |
literal-error | warm | TKTail (MCP) source | 124 ms | 418 ms | 3.4x |
literal-error | warm | C# (.NET 10) source | 75 ms | 332 ms | 4.4x |
literal-error | warm | Python (CPython) source | 289 ms | 2.86 s | 9.9x |
literal-error | warm | PowerShell 7, streaming source | 334 ms | 2.68 s | 8.0x |
literal-error | warm | Windows PowerShell 5.1, streaming source | 521 ms | 3.87 s | 7.4x |
elapsed-ge-1000 | warm | TKTail (MCP) source | 1.32 s | 5.26 s | 4.0x |
elapsed-ge-1000 | warm | C# (.NET 10) source | 98 ms | 739 ms | 7.5x |
elapsed-ge-1000 | warm | Python (CPython) source | 329 ms | 3.31 s | 10.0x |
elapsed-ge-1000 | warm | PowerShell 7, streaming source | 1.55 s | 10.8 s | 7.0x |
elapsed-ge-1000 | warm | Windows PowerShell 5.1, streaming source | 2.31 s | 10.7 s | 4.6x |
count-5xx | warm | TKTail (MCP) source | 1.48 s | 5.36 s | 3.6x |
count-5xx | warm | C# (.NET 10) source | 167 ms | 935 ms | 5.6x |
count-5xx | warm | Python (CPython) source | 796 ms | 4.63 s | 5.8x |
count-5xx | warm | PowerShell 7, streaming source | 1.71 s | 7.64 s | 4.5x |
count-5xx | warm | Windows PowerShell 5.1, streaming source | 2.46 s | 11.7 s | 4.7x |
count-slow | warm | TKTail (MCP) source | 1.26 s | 5.41 s | 4.3x |
count-slow | warm | C# (.NET 10) source | 164 ms | 964 ms | 5.9x |
count-slow | warm | Python (CPython) source | 903 ms | 4.66 s | 5.2x |
count-slow | warm | PowerShell 7, streaming source | 1.85 s | 8.65 s | 4.7x |
count-slow | warm | Windows PowerShell 5.1, streaming source | 2.36 s | 26.0 s | 11.0x |
top-ip-5xx | warm | TKTail (MCP) source | 1.29 s | 5.54 s | 4.3x |
top-ip-5xx | warm | C# (.NET 10) source | 172 ms | 2.03 s | 11.8x |
top-ip-5xx | warm | Python (CPython) source | 880 ms | 10.2 s | 11.6x |
top-ip-5xx | warm | PowerShell 7, streaming source | 1.75 s | 18.5 s | 10.6x |
top-ip-5xx | warm | Windows PowerShell 5.1, streaming source | 2.67 s | 29.1 s | 10.9x |
top-uri-5xx | warm | TKTail (MCP) source | 1.50 s | 5.76 s | 3.8x |
top-uri-5xx | warm | C# (.NET 10) source | 180 ms | 2.14 s | 11.9x |
top-uri-5xx | warm | Python (CPython) source | 748 ms | 10.1 s | 13.6x |
top-uri-5xx | warm | PowerShell 7, streaming source | 1.66 s | 18.5 s | 11.2x |
top-uri-5xx | warm | Windows PowerShell 5.1, streaming source | 2.66 s | 30.0 s | 11.3x |
per-minute-5xx | warm | TKTail (MCP) source | 1.50 s | 5.71 s | 3.8x |
per-minute-5xx | warm | C# (.NET 10) source | 157 ms | 2.03 s | 13.0x |
per-minute-5xx | warm | Python (CPython) source | 834 ms | 9.77 s | 11.7x |
per-minute-5xx | warm | PowerShell 7, streaming source | 2.00 s | 19.1 s | 9.6x |
per-minute-5xx | warm | Windows PowerShell 5.1, streaming source | 2.60 s | 30.1 s | 11.6x |
top-ip-503-post | warm | TKTail (MCP) source | 1.17 s | 5.11 s | 4.4x |
top-ip-503-post | warm | C# (.NET 10) source | 172 ms | 2.08 s | 12.1x |
top-ip-503-post | warm | Python (CPython) source | 764 ms | 10.5 s | 13.8x |
top-ip-503-post | warm | PowerShell 7, streaming source | 1.78 s | 18.8 s | 10.6x |
top-ip-503-post | warm | Windows PowerShell 5.1, streaming source | 2.58 s | 27.9 s | 10.8x |
What an AI assistant receives
"Which 10 clients sent the most POST requests answered 503?" over iis-100mb (1,365 matches), three ways an AI assistant can answer it through TKTail - each checked against the ground truth. Bytes are the tool answers a model reads.
| Workflow | Received over MCP | MCP calls | Saved for a script | Processes | Time | Correct |
|---|---|---|---|---|---|---|
| A. Every record read whole, counted by a script (what TKTail 1.0.2 offered) | 3.55 MB | 1,380 | 3.10 MB | 1 | 16.1 s | yes |
| B. Projected result pages (only c-ip), counted by a script | 559.3 KB | 15 | 614.1 KB | 1 | 3.19 s | yes |
| C. TKTail summarizes: aggregate, top 10 | 4.4 KB | 1 | 0 B | 0 | 1.14 s | yes |
The summary is 805x smaller than reading every record and 127x smaller than projected pages; the count alone is 965 B. Bytes and calls only - no token or price estimate.
An investigation session
5 questions of one incident in a row (count-5xx, top-ip-5xx, top-uri-5xx, per-minute-5xx, count-slow). TKTail warm: the log open, one MCP session, each question asked once. The scripts: one run per question. The last column divides each session by the medians of the same questions asked alone above (cold for a script, warm for TKTail).
| Implementation | Mode | Median of 3 sessions | Min - max | Peak memory | vs the questions alone |
|---|---|---|---|---|---|
| C# (.NET 10) source | a script run per question | 11.2 s | 10.7 s - 11.3 s | 32.3 MB | 1.5x |
| Python (CPython) source | a script run per question | 49.5 s | 46.5 s - 50.4 s | 21.5 MB | 1.7x |
| TKTail (MCP) source | warm (open log) | 67.8 s | 66.0 s - 67.9 s | 71 MB | 2.4x |
| PowerShell 7, streaming source | a script run per question | 93.3 s | 93.1 s - 94.0 s | 112.8 MB | 1.7x |
| Windows PowerShell 5.1, streaming source | a script run per question | 140.4 s | 140.4 s - 145.6 s | 163.7 MB | 1.9x |
In this run every session took 1.5 to 2.4 times its questions asked alone. The scripts do the same deterministic work in every run, so the machine was slower during this phase (a development desktop with other applications running): compare the session rows with each other, not with the tables above.
Where each one is ahead
Computed from the medians above - including where TKTail is not the fastest.
literal-error(cold): fastest C# (.NET 10) (482 ms) - TKTail 869 ms, 1.80x its time; least memory Python (CPython) (21.3 MB)elapsed-ge-1000(cold): fastest C# (.NET 10) (876 ms) - TKTail 6.02 s, 6.9x its time; least memory Python (CPython) (21.2 MB)count-5xx(cold): fastest C# (.NET 10) (1.25 s) - TKTail 6.10 s, 4.9x its time; least memory Python (CPython) (21.2 MB)count-slow(cold): fastest C# (.NET 10) (2.20 s) - TKTail 12.4 s, 5.6x its time; least memory Python (CPython) (21.4 MB)top-ip-5xx(cold): fastest C# (.NET 10) (1.39 s) - TKTail 8.09 s, 5.8x its time; least memory Python (CPython) (21.3 MB)top-uri-5xx(cold): fastest C# (.NET 10) (1.30 s) - TKTail 6.31 s, 4.8x its time; least memory Python (CPython) (21.3 MB)per-minute-5xx(cold): fastest C# (.NET 10) (1.28 s) - TKTail 6.24 s, 4.9x its time; least memory Python (CPython) (21.7 MB)top-ip-503-post(cold): fastest C# (.NET 10) (1.27 s) - TKTail 6.05 s, 4.8x its time; least memory Python (CPython) (21.5 MB)literal-error(warm): fastest C# (.NET 10) (332 ms) - TKTail 418 ms, 1.26x its time; least memory Python (CPython) (21.4 MB)elapsed-ge-1000(warm): fastest C# (.NET 10) (739 ms) - TKTail 5.26 s, 7.1x its time; least memory Python (CPython) (21.2 MB)count-5xx(warm): fastest C# (.NET 10) (935 ms) - TKTail 5.36 s, 5.7x its time; least memory Python (CPython) (21.2 MB)count-slow(warm): fastest C# (.NET 10) (964 ms) - TKTail 5.41 s, 5.6x its time; least memory Python (CPython) (21.2 MB)top-ip-5xx(warm): fastest C# (.NET 10) (2.03 s) - TKTail 5.54 s, 2.7x its time; least memory Python (CPython) (21.5 MB)top-uri-5xx(warm): fastest C# (.NET 10) (2.14 s) - TKTail 5.76 s, 2.7x its time; least memory Python (CPython) (21.3 MB)per-minute-5xx(warm): fastest C# (.NET 10) (2.03 s) - TKTail 5.71 s, 2.8x its time; least memory Python (CPython) (22.1 MB)top-ip-503-post(warm): fastest C# (.NET 10) (2.08 s) - TKTail 5.11 s, 2.5x its time; least memory Python (CPython) (21.7 MB)
competitive-bench-v1 - methodology
What is measured, how, and what the numbers do and do not say. Written before the published run; a change of method is
a new suite version (competitive-bench-v2), never silently the same name.
1. The rule: the same answer first
Every implementation answers every scenario once before anything is timed (scripts/run.py, phase correctness).
Its answer, normalized (scripts/scenarios.py), must equal the ground truth datasets/generate.py computed while it
wrote the data - an oracle independent of every measured implementation: the same count, the same top 10 (count
descending, then the value), the same per-minute buckets. An answer that differs is FAILED CORRECTNESS and is never
timed; a run that exceeds the timeout (30 minutes) is reported as > 30 min, never as a number. The generator makes
every top 10 unambiguous (no tie decides membership - topIsUnambiguous in each expected manifest).
Semantics every implementation keeps:
- Text is case-sensitive and compared as bytes / ordinal strings; the data is ASCII.
- A counted row is a log line: in the application log a line containing
ERROR, or a record’s first line carryingelapsed: <number>ms; in the W3C log a request line (#directive lines are not records). elapsedandtime-takenare compared as numbers (1000.000 >= 1000); the W3C log’s field positions come from its#Fieldsdirective.- Minutes are the W3C log’s own time (UTC),
YYYY-MM-DDTHH:MM.
2. Two cost models - never mixed
Cold (end to end): one process per run - start, read, answer, exit. For TKTail: start the window with the file,
connect an MCP client (TKTail.exe mcp --stdio), ask, receive the answer (the window is closed afterwards, outside
the time). This is “a script run per question” against “start TKTail for one question”.
Warm (investigation session): the same question repeated in a process that is already running. The baselines run
--repeat N+1 and report each repetition’s time (the first warms the JIT / interpreter and is not counted). TKTail
has the file open and indexed (its line index - the state of a user investigating it) and one MCP session; each
repetition is one tktail_search to its end. A warm TKTail does not answer from a cache of earlier answers: every
search reads the file again.
The session scenario asks five questions of one incident in a row (count-5xx, top-ip-5xx, top-uri-5xx,
per-minute-5xx, count-slow): TKTail warm (the log open, one MCP session) against the baselines as one script run
per question. It is labeled a session benchmark.
3. Caches - said, not hidden
- OS file cache: warm. Every dataset is read by a warm-up run before the measured runs; the cache is not cleared (the machine has far more memory than the data). No number here is a cold-disk number.
- TKTail’s own state: the line index of an open file (built in the background when it opens; warm runs start when that work has finished - CPU quiet for 2 s). Searches do not use an inverted index; there is none.
- Regex: TKTail compiles a pattern once per search (PCRE2 with JIT); the baselines use no regular expressions
except the idiomatic PowerShell pipeline (
Select-String, .NET Regex). - JIT / interpreter: cold runs include runtime start-up and JIT; warm runs exclude the first repetition.
4. Repetitions, order, statistics
- A warm-up run per implementation and scenario (not counted), then 5 measured runs - 3 when the warm-up run took more than 60 s. Medians are published with minimum and maximum; spread = (max - min) / median.
- The implementations’ order rotates every run (deterministically) so no one always runs first or last.
- Measured from outside the process: wall time (start to exit), CPU time (user + kernel,
GetProcessTimes), peak working set (GetProcessMemoryInfo). Warm baselines report their own repetition times; their CPU is the process’s total divided by the repetitions. TKTail’s CPU is the window’s plus the MCP bridge’s; its peak working set is the window’s. - Throughput = dataset bytes / median time (MB = 10^6 bytes).
5. The implementations (code review before timing)
| Implementation | Streams? | Whole file in memory? | Regex | Buffering | Known inefficiency | Fairness |
|---|---|---|---|---|---|---|
C# (csharp/Program.cs) |
yes, 1 MB blocks as byte spans | no | none (vectorized IndexOf, Utf8Parser) |
1 MB, SequentialScan |
none known; strings only for keys of matching lines | accepted |
Python (python/bench.py) |
yes, binary line iteration | no | none (bytes.find, split) |
1 MB | split of every W3C line (the idiomatic way) |
accepted |
PowerShell optimized (powershell/bench.ps1) |
yes, StreamReader.ReadLine |
no | none (ordinal Contains / IndexOf) |
1 MB | the interpreter’s per-line cost - inherent | accepted |
PowerShell idiomatic (powershell/idiomatic.ps1) |
Select-String / Get-Content -ReadCount 1000 stream |
no | .NET Regex in Select-String |
cmdlet defaults | an object per record (ConvertFrom-Csv, Group-Object) - inherent to the idiom |
labeled a convenience baseline |
TKTail (tktail/tktail_driver.py) |
yes | no | PCRE2 (the number scenario’s capture) | its block cache | parses all 16 W3C fields of a record for a field condition | product path (MCP) |
No implementation is multi-threaded; TKTail’s search of one file runs on one thread. TKTail is measured through the interface an AI client uses - JSON-RPC over a pipe and a bridge process included - never an internal engine call.
6. Fairness notes (differences that remain)
- TKTail reads a field condition through its W3C record parser (every field, its type and role); the C# baseline splits a line only as far as the field it needs.
- The number scenario: TKTail extracts with a regular expression’s named capture (
elapsed: (?<ms>\d+(?:\.\d+)?)ms) as a user would write it; the baselines find the marker and parse the digits directly. - A cold TKTail run starts a Windows application with a window and its MCP bridge, and builds the file’s line index in the background while it searches; a cold script starts a runtime.
- The PowerShell baselines run unchanged on 5.1 and 7; no C# is compiled into them (that would be the C# baseline).
- The isolation switch
--internal-instance-scopegives the measured TKTail copy its own single-instance family so it never joins a TKTail the user runs; it changes nothing in how TKTail opens, reads or searches.
7. The payload scenario (what crosses the MCP boundary)
“Which 10 clients sent the most POST requests answered 503?” over the 100 MB W3C log (1,365 matches - all stored by the search, so the full-record workflow is complete): three workflows, each checked against the ground truth.
- A. Full records (what TKTail 1.0.2 offered): result pages (their first fields do not include
c-ip), then each record read whole (tktail_get_record), saved, counted by a script (scripts/top_from_pages.py). - B. Projection (1.1.0): result pages with
"fields": ["c-ip"], "preview": false, saved, counted by the script. - C. Aggregation (1.1.0): one
tktail_searchwith"aggregate": {"groupBy": ["c-ip"], "top": 10}.
Measured: the bytes of the tool answers (the JSON a model reads; the JSON-RPC envelope carries it twice and is not counted), the MCP calls, the bytes saved for the script, the processes launched, the wall time. No token or money estimate is made.
8. What the numbers do not say
They are this machine (recorded in environment.json: CPU, memory, disk, Windows build, security software), this
TKTail exe (its SHA-256), these runtimes and these implementations. They are not a ranking of languages, and a
different machine, disk or antivirus configuration gives different numbers.
The source
The files of the benchmark source ZIP, readable here (MIT license, the suite only). SHA-256 of each file with LF line endings - the bytes in the ZIP.
.gitignoreb2098a841157273a...LICENSE96efe047c12a439e...README.md05d0f9affcf0fc5d...csharp/CompetitiveBench.csproj578b6436c7c9b6e9...csharp/Program.cs18d2b050ad29c13a...csharp/global.jsonb48d6da8fa62c0da...datasets/README.md9e65160a3fdc108f...datasets/configs/applog-100mb.jsonf2a9b9bff58e0085...datasets/configs/applog-1gb.json7622c37021892075...datasets/configs/iis-100mb.json3d92e8d2f1ae3f0e...datasets/configs/iis-1gb.json7edb64882ccc12f5...datasets/generate.py352edd7206021c26...methodology/METHODOLOGY.mdd6c89f0f13849356...powershell/bench.ps12e94358ea1c22a34...powershell/idiomatic.ps1bbb45a85d87ec7d6...python/bench.py264d964307793c87...results/README.md5d2272861bfd8d20...scripts/run.py77ece61dc4ba0d26...scripts/scenarios.pyc4cd2cf3d938e238...scripts/suite_digest.py27c4e0543087d032...scripts/summarize.pyc95be9a3b998311b...scripts/top_from_pages.py1dd409e75b6ce97f...tktail/tktail_driver.py93a6774fcc0cdf7a...