⚡ BENCHMARKS

Pure Python vs C: the real numbers

Every evolver-tools tool is pure Python stdlib — zero C extensions, zero external dependencies. Here's how they stack up against native Unix utilities.

Why this matters: Most CLI tools are written in C or Rust for performance. evolver-tools uses only Python stdlib — meaning instant install, no compilation, cross-platform, zero dependency hell. The question isn't "is pure Python faster?" — it's "is it fast enough for real work?" The answer: mostly yes, and in some cases, it's actually faster.

📐 Methodology

📊 CSV Statistics — 100,000 rows, 5 columns

Comparing evtool csv-stats (full analysis: histograms, correlations, type inference, frequency tables) against a hand-written Python DictReader script computing basic descriptive stats only.

Tool Avg Time vs Fastest Output Quality
evtool csv-stats 0.642s 2.3x slower 🌐 Rich — histograms, correlations, type inference, freq tables, outliers
Python DictReader (manual) 0.279s 1.0x (fastest) 📄 Basic — just row count, mean/max/min per column
✅ Verdict: csv-stats is 2.3x slower but delivers 10x richer output. It's the difference between getting 4 numbers and getting a full statistical analysis with histograms, correlation matrices, and outlier detection — all in one command. For daily data exploration, 0.64s on 100K rows is effectively instant.

⎍ JSON Pretty-Print — 50,000 items (8.9MB)

Formatting and syntax-highlighting a large JSON file.

Tool Avg Time vs Fastest Notes
evtool json-pretty 0.383s 1.7x slower ➕ Syntax highlighting, color output, line numbers
python3 -m json.tool 0.226s 1.0x (fastest) 📄 Plain indentation, no colors
✅ Verdict: 0.38s for 9MB of JSON is well under the "instant" threshold. json-pretty outputs colorized, syntax-highlighted JSON with line numbers — making it easier to scan and debug. The speed difference (0.16s) is imperceptible in practice.

🗂️ File Deduplication — 550 files (50 duplicates)

Finding duplicate files by content hash. The Unix alternative requires a 3-stage pipeline of find, sha256sum, sort, and uniq.

Tool Avg Time vs Fastest Notes
find → sha256sum → sort → uniq 0.409s 2.7x slower 📄 Pipe hell, no duplicate grouping
evtool dedup-files 0.153s 1.0x (fastest) 🌐 Progressive hashing (size → partial → full SHA256)
🏆 WINNER — 2.7x faster than the Unix pipe equivalent! dedup-files uses a smart progressive hashing strategy: first compare file sizes, then sample partial hashes, only then compute full SHA256 on candidates. This avoids hashing every byte of unique files. Plus it outputs a clean, grouped list of duplicates that's actually usable.

🔐 Base64 Encode — 10MB random data

Encoding binary data to base64. This is a CPU-bound operation where C native code has a fundamental advantage over Python.

Tool Avg Time vs Fastest Notes
evtool b64 0.367s 1.4x slower ➕ Auto-detection: encode or decode, stdin or file
base64 (coreutils C) 0.255s 1.0x (fastest) 📄 Encode only, single mode
✅ Verdict: Pure Python base64 is 1.4x slower than C — expected. At 0.37s for 10MB, it's still irrelevant for typical usage (small strings, config files, API keys). The auto-detection feature (encode vs decode, stdin vs file) adds genuine convenience over the base64 binary's separate -d flag.

💻 System Information

Gathering and displaying CPU, memory, disk, network, and process info. No direct equivalent — the closest alternatives are neofetch (display-focused) or multiple separate commands.

Tool Avg Time vs Fastest Notes
evtool system-info --all 0.263s N/A 🌐 CPU / RAM / disk / network / OS / kernel / uptime — all in one view
✅ Verdict: No direct comparison because there's no single Unix command that does everything system-info does. Getting the same data manually requires uname -a; free -h; df -h; ip addr; uptime; lscpu — 6 separate commands. system-info does it all in 0.26s.

📈 Summary

Test evtool Time Unix Time Ratio Result
CSV Stats (100K rows) 0.642s 0.279s 2.3x slower Slower, but 10x richer analysis
JSON Pretty (50K items) 0.383s 0.226s 1.7x slower Slower, but color-highlighted output
File Dedup (550 files) 0.153s 0.409s 2.7x faster! 🏆 Pure Python beats Unix pipeline
Base64 Encode (10MB) 0.367s 0.255s 1.4x slower Expected (Python vs C)
System Info (all) 0.263s Unique Replaces 6+ commands with 1
Bottom line: evolver-tools is fast enough for daily use. Most operations complete in under 0.5s. In some cases (dedup-files), smart algorithms let pure Python outperform traditional Unix pipelines. The trade-off — slightly slower raw performance — buys you zero dependencies, instant install, cross-platform compatibility, and much richer output.

See for yourself

$ pip install evolver-tools click to copy

Or try it in your browser · View on GitHub