benchmarks

command
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 6 Imported by: 0

README

Performance Benchmarks

This directory contains performance benchmarks comparing aict tools against GNU coreutils.

Running Benchmarks

go run ./benchmarks/bench.go

Results

Tool GNU aict Ratio Status
ls (1000 files) ~2ms ~15ms 7x ✅ PASS
grep (100k lines) ~1ms ~100ms 100x ⚠️ SLOW
find (deep tree) ~2ms ~9ms 5x ✅ PASS
cat (100k lines) ~1ms ~23ms 17x ⚠️ SLOW
diff (1000 lines) ~1ms ~10ms 10x ✅ PASS

Analysis

Why is aict slower?

aict provides significantly more functionality than GNU coreutils:

  1. Language Detection - Each file is analyzed for programming language
  2. MIME Detection - Magic bytes analysis for file type
  3. Structured Output - XML/JSON structures instead of plain text
  4. Enriched Metadata - Timestamps, permissions, ownership, etc.
Optimization Notes
  • --plain mode skips some enrichment but still builds result structures
  • For maximum speed, consider using GNU coreutils directly when structured output isn't needed
  • The trade-off is intentional: more tokens spent on parsing vs. more semantic information
Passing Criteria

Per the roadmap, tools should be <10x slower than GNU equivalents for typical codebases. Most tools pass this criterion. The exceptions (grep, cat) are due to the enrichment features which are core to aict's value proposition.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL