v2.1.0 - RFC Pattern & Performance Optimizations
RFC Pattern Implementation
- Implemented RFC pattern with ContiguousArray as canonical byte representation
- Added zero-copy ContiguousArray initializer for HTML types
- Added Array convenience initializer
- Updated String initializer to derive from canonical bytes
- Deprecated legacy .render() methods in favor of RFC pattern
Performance Optimizations
- Eliminated UTF-8 conversions by using [UInt8] in Configuration (indentation/newline)
- Added capacity pre-allocation support to HTMLPrinter (reservedCapacity parameter)
- Optimized attribute value HTML escaping with fast-path detection (~30% faster)
- Integrated INCITS 4-1986 for ASCII constants
- Performance: ~3,500 documents/second (~280µs per complete HTML document)
Documentation
- Updated README with RFC pattern examples
- Added comprehensive inline documentation
- Updated performance metrics throughout codebase
Testing
- Added comprehensive performance tests for attribute escaping
- Added performance tests for capacity optimization
- All 198 tests passing
CI/CD
- Updated CI to use Swift 6.2 for all jobs
- Adjusted performance test thresholds for CI runners
- Improved cache key management
Breaking Changes
None - all changes are backward compatible through deprecations.