Skip to content
TKTail

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).

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.

ScenarioDatasetC# (.NET 10)Python (CPython)PowerShell 7, streamingWindows PowerShell 5.1, streamingPowerShell 7, idiomatic pipeline
literal-errorapplog-1gbOKOKOKOKOK
elapsed-ge-1000applog-1gbOKOKOKOKOK
count-5xxiis-1gbOKOKOKOKOK
count-slowiis-1gbOKOKOKOK-
top-ip-5xxiis-1gbOKOKOKOKOK
top-uri-5xxiis-1gbOKOKOKOK-
per-minute-5xxiis-1gbOKOKOKOKOK
top-ip-503-postiis-1gbOKOKOKOK-

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).

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source869 ms756 ms - 884 ms (5 runs)1235.21.17 s65.7 MB1x
C# (.NET 10) source482 ms470 ms - 520 ms (5 runs)2227.2484 ms30.7 MB0.55x
Python (CPython) source2.90 s2.84 s - 2.98 s (5 runs)369.72.88 s21.3 MB3.34x
PowerShell 7, streaming source3.12 s2.78 s - 3.26 s (5 runs)344.13.28 s110.5 MB3.59x
Windows PowerShell 5.1, streaming source4.35 s4.18 s - 4.59 s (5 runs)246.94.33 s156.1 MB5x
PowerShell 7, idiomatic pipeline source3.84 s3.43 s - 4.06 s (5 runs)279.73.98 s108.1 MB4.42x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source418 ms405 ms - 433 ms (5 runs)2566.9406 ms74.3 MB1x
C# (.NET 10) source332 ms300 ms - 361 ms (5 runs)3233.8346 ms28.2 MB0.79x
Python (CPython) source2.86 s2.66 s - 3.11 s (5 runs)375.62.83 s21.4 MB6.83x
PowerShell 7, streaming source2.68 s2.52 s - 2.82 s (5 runs)401.42.72 s116.7 MB6.4x
Windows PowerShell 5.1, streaming source3.87 s3.58 s - 4.31 s (5 runs)277.53.96 s155.7 MB9.25x

elapsed-ge-1000 - applog-1gb

Count the records whose "elapsed: <number>ms" is 1000 or more (the number read exactly; 1000.000 counts).

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source6.02 s5.53 s - 6.08 s (5 runs)178.36.41 s62.4 MB1x
C# (.NET 10) source876 ms818 ms - 889 ms (5 runs)1225.3906 ms30.8 MB0.15x
Python (CPython) source3.16 s3.14 s - 3.30 s (5 runs)340.33.14 s21.2 MB0.52x
PowerShell 7, streaming source11.0 s10.6 s - 11.6 s (5 runs)97.811.3 s112.6 MB1.82x
Windows PowerShell 5.1, streaming source11.4 s11.2 s - 12.0 s (5 runs)94.611.4 s157.4 MB1.89x
PowerShell 7, idiomatic pipeline source28.3 s27.8 s - 29.2 s (5 runs)37.928.6 s111.9 MB4.7x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.26 s5.17 s - 5.69 s (5 runs)204.15.30 s74.3 MB1x
C# (.NET 10) source739 ms689 ms - 829 ms (5 runs)1453.2763 ms28.3 MB0.14x
Python (CPython) source3.31 s2.96 s - 3.46 s (5 runs)324.53.26 s21.2 MB0.63x
PowerShell 7, streaming source10.8 s10.2 s - 11.5 s (5 runs)99.510.7 s118.3 MB2.05x
Windows PowerShell 5.1, streaming source10.7 s10.5 s - 11.1 s (5 runs)100.410.7 s157.3 MB2.03x

count-5xx - iis-1gb

Count the requests with sc-status 500 or higher.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source6.10 s5.47 s - 6.62 s (5 runs)175.96.48 s62.3 MB1x
C# (.NET 10) source1.25 s1.21 s - 1.36 s (5 runs)860.51.28 s30.9 MB0.2x
Python (CPython) source4.73 s4.53 s - 5.11 s (5 runs)226.94.72 s21.2 MB0.78x
PowerShell 7, streaming source8.83 s8.28 s - 9.17 s (5 runs)121.69.05 s115.2 MB1.45x
Windows PowerShell 5.1, streaming source11.8 s11.6 s - 12.2 s (5 runs)90.811.9 s158.9 MB1.94x
PowerShell 7, idiomatic pipeline source98.1 s97.9 s - 100.6 s (3 runs)10.998.4 s111.8 MB16.07x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.36 s5.08 s - 5.49 s (5 runs)200.55.34 s74.3 MB1x
C# (.NET 10) source935 ms892 ms - 1.12 s (5 runs)1148.3974 ms28.2 MB0.17x
Python (CPython) source4.63 s4.46 s - 5.28 s (5 runs)231.74.72 s21.2 MB0.87x
PowerShell 7, streaming source7.64 s7.59 s - 8.15 s (5 runs)140.57.86 s115.6 MB1.43x
Windows PowerShell 5.1, streaming source11.7 s11.2 s - 12.2 s (5 runs)91.911.7 s158.6 MB2.18x

count-slow - iis-1gb

Count the requests with time-taken 1000 (ms) or more.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source12.4 s9.39 s - 13.8 s (5 runs)86.310.5 s62 MB1x
C# (.NET 10) source2.20 s2.02 s - 2.30 s (5 runs)487.31.72 s30.7 MB0.18x
Python (CPython) source9.97 s9.45 s - 10.3 s (5 runs)107.77.64 s21.4 MB0.8x
PowerShell 7, streaming source17.6 s16.9 s - 18.3 s (5 runs)61.114.0 s112.9 MB1.41x
Windows PowerShell 5.1, streaming source25.6 s24.9 s - 26.0 s (5 runs)41.920.1 s159.2 MB2.06x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.41 s5.23 s - 5.65 s (5 runs)198.65.44 s74.3 MB1x
C# (.NET 10) source964 ms939 ms - 1.11 s (5 runs)1114.21.01 s28.2 MB0.18x
Python (CPython) source4.66 s4.38 s - 4.87 s (5 runs)230.64.69 s21.2 MB0.86x
PowerShell 7, streaming source8.65 s8.34 s - 13.7 s (5 runs)124.19.18 s121.9 MB1.6x
Windows PowerShell 5.1, streaming source26.0 s25.4 s - 26.4 s (5 runs)41.320.3 s158.9 MB4.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.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source8.09 s6.24 s - 14.7 s (5 runs)132.68.31 s64.6 MB1x
C# (.NET 10) source1.39 s1.15 s - 2.42 s (5 runs)774.61.44 s32 MB0.17x
Python (CPython) source5.28 s4.74 s - 10.3 s (5 runs)203.35.23 s21.3 MB0.65x
PowerShell 7, streaming source9.91 s9.34 s - 20.1 s (5 runs)108.310.2 s116.4 MB1.22x
Windows PowerShell 5.1, streaming source12.9 s12.0 s - 30.4 s (5 runs)8312.9 s163.5 MB1.6x
PowerShell 7, idiomatic pipeline source245.9 s104.0 s - 246.0 s (3 runs)4.4185.6 s864.4 MB30.38x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.54 s5.39 s - 5.99 s (5 runs)193.95.52 s74.3 MB1x
C# (.NET 10) source2.03 s1.76 s - 2.13 s (5 runs)529.11.55 s30.2 MB0.37x
Python (CPython) source10.2 s9.88 s - 10.4 s (5 runs)104.87.93 s21.5 MB1.85x
PowerShell 7, streaming source18.5 s18.0 s - 18.7 s (5 runs)58.114.6 s127.6 MB3.34x
Windows PowerShell 5.1, streaming source29.1 s28.0 s - 29.6 s (5 runs)36.922.3 s163.3 MB5.25x

top-uri-5xx - iis-1gb

The 10 URL paths (cs-uri-stem) with the most requests with sc-status 500 or higher.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source6.31 s6.03 s - 6.96 s (5 runs)170.16.80 s62.5 MB1x
C# (.NET 10) source1.30 s1.24 s - 1.38 s (5 runs)823.41.33 s31.9 MB0.21x
Python (CPython) source4.51 s4.26 s - 4.52 s (5 runs)238.34.48 s21.3 MB0.71x
PowerShell 7, streaming source8.87 s8.22 s - 8.92 s (5 runs)1219.13 s116.1 MB1.41x
Windows PowerShell 5.1, streaming source12.2 s11.8 s - 12.8 s (5 runs)88.112.1 s163.3 MB1.93x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.76 s5.67 s - 6.01 s (5 runs)186.55.77 s74.7 MB1x
C# (.NET 10) source2.14 s2.09 s - 2.30 s (5 runs)501.51.62 s30 MB0.37x
Python (CPython) source10.1 s9.83 s - 10.3 s (5 runs)105.87.63 s21.3 MB1.76x
PowerShell 7, streaming source18.5 s18.1 s - 19.6 s (5 runs)58.114.6 s127 MB3.21x
Windows PowerShell 5.1, streaming source30.0 s29.7 s - 31.6 s (5 runs)35.823.0 s163.4 MB5.21x

per-minute-5xx - iis-1gb

Requests with sc-status 500 or higher per minute (the W3C time is UTC), in time order.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source6.24 s6.14 s - 6.47 s (5 runs)172.16.67 s62.4 MB1x
C# (.NET 10) source1.28 s1.16 s - 1.41 s (5 runs)8391.30 s32.2 MB0.21x
Python (CPython) source4.24 s4.01 s - 4.35 s (5 runs)253.34.20 s21.7 MB0.68x
PowerShell 7, streaming source8.98 s8.50 s - 9.19 s (5 runs)119.69.33 s116.3 MB1.44x
Windows PowerShell 5.1, streaming source12.7 s11.8 s - 12.8 s (5 runs)84.812.6 s162.5 MB2.03x
PowerShell 7, idiomatic pipeline source103.6 s102.8 s - 105.0 s (3 runs)10.4103.7 s901.5 MB16.61x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.71 s5.37 s - 6.00 s (5 runs)1885.56 s74.7 MB1x
C# (.NET 10) source2.03 s1.95 s - 2.08 s (5 runs)528.21.54 s31.7 MB0.36x
Python (CPython) source9.77 s9.34 s - 10.4 s (5 runs)109.87.36 s22.1 MB1.71x
PowerShell 7, streaming source19.1 s18.3 s - 19.7 s (5 runs)56.214.5 s127.3 MB3.35x
Windows PowerShell 5.1, streaming source30.1 s29.0 s - 31.1 s (5 runs)35.722.4 s162.3 MB5.26x

top-ip-503-post - iis-1gb

The 10 client addresses with the most POST requests answered 503.

Cold - one process per question
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source6.05 s5.85 s - 6.28 s (5 runs)177.56.42 s63 MB1x
C# (.NET 10) source1.27 s1.21 s - 1.34 s (5 runs)848.51.30 s31.9 MB0.21x
Python (CPython) source4.53 s4.36 s - 4.90 s (5 runs)2374.52 s21.5 MB0.75x
PowerShell 7, streaming source8.95 s8.01 s - 9.41 s (5 runs)119.99.30 s116.3 MB1.48x
Windows PowerShell 5.1, streaming source12.3 s12.3 s - 12.9 s (5 runs)8712.3 s163.8 MB2.04x
Warm - repeated in a running process
ImplementationMedianMin - maxMB/sCPUPeak memoryvs TKTail
TKTail (MCP) source5.11 s4.72 s - 5.17 s (5 runs)210.25.08 s75.3 MB1x
C# (.NET 10) source2.08 s2.02 s - 2.09 s (5 runs)516.11.55 s30.1 MB0.41x
Python (CPython) source10.5 s10.3 s - 11.1 s (5 runs)101.97.92 s21.7 MB2.06x
PowerShell 7, streaming source18.8 s18.0 s - 19.3 s (5 runs)57.114.8 s127.5 MB3.68x
Windows PowerShell 5.1, streaming source27.9 s27.0 s - 31.2 s (5 runs)38.522.5 s163.2 MB5.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.

ScenarioPhaseImplementation100 MB1 GBFactor
literal-errorcoldTKTail (MCP) source1.61 s869 ms0.5x
literal-errorcoldC# (.NET 10) source294 ms482 ms1.6x
literal-errorcoldPython (CPython) source690 ms2.90 s4.2x
literal-errorcoldPowerShell 7, streaming source1.55 s3.12 s2.0x
literal-errorcoldWindows PowerShell 5.1, streaming source1.62 s4.35 s2.7x
literal-errorcoldPowerShell 7, idiomatic pipeline source1.80 s3.84 s2.1x
elapsed-ge-1000coldTKTail (MCP) source2.56 s6.02 s2.3x
elapsed-ge-1000coldC# (.NET 10) source402 ms876 ms2.2x
elapsed-ge-1000coldPython (CPython) source770 ms3.16 s4.1x
elapsed-ge-1000coldPowerShell 7, streaming source3.14 s11.0 s3.5x
elapsed-ge-1000coldWindows PowerShell 5.1, streaming source2.76 s11.4 s4.1x
elapsed-ge-1000coldPowerShell 7, idiomatic pipeline source8.25 s28.3 s3.4x
count-5xxcoldTKTail (MCP) source2.21 s6.10 s2.8x
count-5xxcoldC# (.NET 10) source567 ms1.25 s2.2x
count-5xxcoldPython (CPython) source1.16 s4.73 s4.1x
count-5xxcoldPowerShell 7, streaming source2.80 s8.83 s3.1x
count-5xxcoldWindows PowerShell 5.1, streaming source3.10 s11.8 s3.8x
count-5xxcoldPowerShell 7, idiomatic pipeline source24.0 s98.1 s4.1x
count-slowcoldTKTail (MCP) source2.03 s12.4 s6.1x
count-slowcoldC# (.NET 10) source539 ms2.20 s4.1x
count-slowcoldPython (CPython) source1.11 s9.97 s9.0x
count-slowcoldPowerShell 7, streaming source2.55 s17.6 s6.9x
count-slowcoldWindows PowerShell 5.1, streaming source2.95 s25.6 s8.7x
top-ip-5xxcoldTKTail (MCP) source2.51 s8.09 s3.2x
top-ip-5xxcoldC# (.NET 10) source581 ms1.39 s2.4x
top-ip-5xxcoldPython (CPython) source1.05 s5.28 s5.0x
top-ip-5xxcoldPowerShell 7, streaming source3.15 s9.91 s3.1x
top-ip-5xxcoldWindows PowerShell 5.1, streaming source3.30 s12.9 s3.9x
top-ip-5xxcoldPowerShell 7, idiomatic pipeline source25.8 s245.9 s9.5x
top-uri-5xxcoldTKTail (MCP) source2.20 s6.31 s2.9x
top-uri-5xxcoldC# (.NET 10) source575 ms1.30 s2.3x
top-uri-5xxcoldPython (CPython) source919 ms4.51 s4.9x
top-uri-5xxcoldPowerShell 7, streaming source3.18 s8.87 s2.8x
top-uri-5xxcoldWindows PowerShell 5.1, streaming source3.28 s12.2 s3.7x
per-minute-5xxcoldTKTail (MCP) source2.44 s6.24 s2.6x
per-minute-5xxcoldC# (.NET 10) source526 ms1.28 s2.4x
per-minute-5xxcoldPython (CPython) source875 ms4.24 s4.8x
per-minute-5xxcoldPowerShell 7, streaming source2.73 s8.98 s3.3x
per-minute-5xxcoldWindows PowerShell 5.1, streaming source3.07 s12.7 s4.1x
per-minute-5xxcoldPowerShell 7, idiomatic pipeline source26.2 s103.6 s4.0x
top-ip-503-postcoldTKTail (MCP) source2.04 s6.05 s3.0x
top-ip-503-postcoldC# (.NET 10) source566 ms1.27 s2.2x
top-ip-503-postcoldPython (CPython) source916 ms4.53 s4.9x
top-ip-503-postcoldPowerShell 7, streaming source2.60 s8.95 s3.4x
top-ip-503-postcoldWindows PowerShell 5.1, streaming source3.16 s12.3 s3.9x
literal-errorwarmTKTail (MCP) source124 ms418 ms3.4x
literal-errorwarmC# (.NET 10) source75 ms332 ms4.4x
literal-errorwarmPython (CPython) source289 ms2.86 s9.9x
literal-errorwarmPowerShell 7, streaming source334 ms2.68 s8.0x
literal-errorwarmWindows PowerShell 5.1, streaming source521 ms3.87 s7.4x
elapsed-ge-1000warmTKTail (MCP) source1.32 s5.26 s4.0x
elapsed-ge-1000warmC# (.NET 10) source98 ms739 ms7.5x
elapsed-ge-1000warmPython (CPython) source329 ms3.31 s10.0x
elapsed-ge-1000warmPowerShell 7, streaming source1.55 s10.8 s7.0x
elapsed-ge-1000warmWindows PowerShell 5.1, streaming source2.31 s10.7 s4.6x
count-5xxwarmTKTail (MCP) source1.48 s5.36 s3.6x
count-5xxwarmC# (.NET 10) source167 ms935 ms5.6x
count-5xxwarmPython (CPython) source796 ms4.63 s5.8x
count-5xxwarmPowerShell 7, streaming source1.71 s7.64 s4.5x
count-5xxwarmWindows PowerShell 5.1, streaming source2.46 s11.7 s4.7x
count-slowwarmTKTail (MCP) source1.26 s5.41 s4.3x
count-slowwarmC# (.NET 10) source164 ms964 ms5.9x
count-slowwarmPython (CPython) source903 ms4.66 s5.2x
count-slowwarmPowerShell 7, streaming source1.85 s8.65 s4.7x
count-slowwarmWindows PowerShell 5.1, streaming source2.36 s26.0 s11.0x
top-ip-5xxwarmTKTail (MCP) source1.29 s5.54 s4.3x
top-ip-5xxwarmC# (.NET 10) source172 ms2.03 s11.8x
top-ip-5xxwarmPython (CPython) source880 ms10.2 s11.6x
top-ip-5xxwarmPowerShell 7, streaming source1.75 s18.5 s10.6x
top-ip-5xxwarmWindows PowerShell 5.1, streaming source2.67 s29.1 s10.9x
top-uri-5xxwarmTKTail (MCP) source1.50 s5.76 s3.8x
top-uri-5xxwarmC# (.NET 10) source180 ms2.14 s11.9x
top-uri-5xxwarmPython (CPython) source748 ms10.1 s13.6x
top-uri-5xxwarmPowerShell 7, streaming source1.66 s18.5 s11.2x
top-uri-5xxwarmWindows PowerShell 5.1, streaming source2.66 s30.0 s11.3x
per-minute-5xxwarmTKTail (MCP) source1.50 s5.71 s3.8x
per-minute-5xxwarmC# (.NET 10) source157 ms2.03 s13.0x
per-minute-5xxwarmPython (CPython) source834 ms9.77 s11.7x
per-minute-5xxwarmPowerShell 7, streaming source2.00 s19.1 s9.6x
per-minute-5xxwarmWindows PowerShell 5.1, streaming source2.60 s30.1 s11.6x
top-ip-503-postwarmTKTail (MCP) source1.17 s5.11 s4.4x
top-ip-503-postwarmC# (.NET 10) source172 ms2.08 s12.1x
top-ip-503-postwarmPython (CPython) source764 ms10.5 s13.8x
top-ip-503-postwarmPowerShell 7, streaming source1.78 s18.8 s10.6x
top-ip-503-postwarmWindows PowerShell 5.1, streaming source2.58 s27.9 s10.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.

WorkflowReceived over MCPMCP callsSaved for a scriptProcessesTimeCorrect
A. Every record read whole, counted by a script (what TKTail 1.0.2 offered)3.55 MB1,3803.10 MB116.1 syes
B. Projected result pages (only c-ip), counted by a script559.3 KB15614.1 KB13.19 syes
C. TKTail summarizes: aggregate, top 104.4 KB10 B01.14 syes

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).

ImplementationModeMedian of 3 sessionsMin - maxPeak memoryvs the questions alone
C# (.NET 10) sourcea script run per question11.2 s10.7 s - 11.3 s32.3 MB1.5x
Python (CPython) sourcea script run per question49.5 s46.5 s - 50.4 s21.5 MB1.7x
TKTail (MCP) sourcewarm (open log)67.8 s66.0 s - 67.9 s71 MB2.4x
PowerShell 7, streaming sourcea script run per question93.3 s93.1 s - 94.0 s112.8 MB1.7x
Windows PowerShell 5.1, streaming sourcea script run per question140.4 s140.4 s - 145.6 s163.7 MB1.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 carrying elapsed: <number>ms; in the W3C log a request line (# directive lines are not records).
  • elapsed and time-taken are compared as numbers (1000.000 >= 1000); the W3C log’s field positions come from its #Fields directive.
  • 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-scope gives 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_search with "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.