go-astits
go-astits copied to clipboard
Major optimization 6x faster
RTP to MPEGTS benchmark.
Before: 33556858 ns/op 4763101 B/op
After: 5169437 ns/op 3881852 B/op
I wrote this a few months ago and have been using it in production for weeks on end without issues. I no longer have a use for mpegts library, so I figured you could have it. There may be some small breaking changes, but all tests pass.
Changes:
- Use icza/bitio for bit manipulation
- Dynamic CRC32 calculation
- Don't use fmt.Sprintf when parsing timestamp
Thanks! Could you create a PR with the optimizations only and not the reformatting/linting changes ?