Performance Benchmarks
xBarcode vs rxing vs barcoders
A comprehensive analysis of Rust barcode generation libraries. xBarcode is engineered for high-throughput industrial applications, prioritizing speed, correctness, and feature completeness.
Speed Comparison
Execution time per barcode (lower is better). Benchmarked on Apple M-Series Silicon. *rxing is omitted for QR where it is significantly slower than the specialized fast_qr.
| Symbology | xBarcode (µs) | rxing (µs) | qrcode (µs) | fast_qr (µs) | Speedup |
|---|---|---|---|---|---|
| Aztec Code | 1.5 | 7.4 | - | - | 4.9x (vs rxing) 🚀 |
| PDF417 | 3.7 | 7.4 | - | - | 2.0x (vs rxing) 🚀 |
| Code 128 | 0.78 | 1.5 | - | - | 1.9x (vs rxing) 🚀 |
| Data Matrix | 1.4 | 2.8 | - | - | 2.0x (vs rxing) 🚀 |
| QR (Numeric) | 4.3 | - | 158.0 | 28.0 | 6.5x (vs fast_qr) 🚀 |
| QR (Mixed/Alpha) | 4.4 | - | 160.0 | 29.0 | 6.6x (vs fast_qr) 🚀 |
Technical Capabilities
Best Choice
xBarcode
- GS1 Support (FNC1/AI) Full (Validation + Parsing)
- Error Correction Levels All Levels (L/M/Q/H)
- Output Formats SVG, Matrix (Raw)
- Kanji/UTF-8 Efficiency Optimal (Smart Switching)
- Zero-Allocation Path Yes (Small Payloads)
rxing
- GS1 Support (FNC1/AI) Partial / Raw
- Error Correction Levels Fixed / Limited
- Output Formats Matrix / Raw
- Kanji/UTF-8 Efficiency Non-Optimal (Bloated)
- Zero-Allocation Path No
barcoders
- GS1 Support (FNC1/AI) None
- Error Correction Levels N/A (1D)
- Output Formats SVG, String
- Kanji/UTF-8 Efficiency Unsupported
- Zero-Allocation Path No
Conclusion
xBarcode is the clear winner for industrial use cases, offering 2x-7x speedups for complex 2D codes and robust GS1 support.