Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cpu_overhead_results.txt 921B

12345678910111213141516171819202122232425262728
  1. Date: 2026-03-27
  2. Platform: darwin/arm64, Apple M4, 10 cores
  3. Test: CPU overhead of stack vs pool buffer allocation
  4. === Raw relay (no TLS), 10 MB throughput ===
  5. stack_16KB: 951-961 ns/op 10,906-11,018 MB/s
  6. pool_16KB: 957-978 ns/op 10,724-10,952 MB/s
  7. pool_4KB: 953-979 ns/op 10,713-11,004 MB/s
  8. Delta: <2% — within noise
  9. === TLS relay (client→telegram direction), 10 MB ===
  10. stack_16KB: 1,071-1,093 ns/op 9,591-9,788 MB/s
  11. pool_16KB: 1,089-1,106 ns/op 9,480-9,633 MB/s
  12. pool_4KB: 1,083-1,092 ns/op 9,599-9,676 MB/s
  13. Delta: <2% — within noise
  14. === Isolated Pool.Get/Put overhead ===
  15. 7.26-7.33 ns/op (0 allocs)
  16. === Isolated stack alloc ===
  17. 0.25 ns/op (0 allocs)
  18. === Analysis ===
  19. Pool.Get+Put adds ~7 ns overhead per connection (one-time, not per read).
  20. For a 10 MB transfer taking ~1,000,000 ns, this is 0.0007% overhead.
  21. Throughput is identical within measurement noise for all three variants.