lib Socket Management Performance Benchmark ================================================ === Socket Management Benchmark === Testing with 25 sockets DEBUG: Socket 0 has fd=6 Created 25 sockets DEBUG: Total sockets added: 25 Add 25 sockets: 30 us (1.20 us per socket) SKIPPING POLLING to test corruption DEBUG: Removing sockets using lookup by FD DEBUG: Attempting to remove socket 0 (fd=6, id=0x653e819a3b90) DEBUG: Attempting to remove socket 1 (fd=7, id=0x653e819a3bd8) DEBUG: Attempting to remove socket 2 (fd=8, id=0x653e819a3c20) DEBUG: Attempting to remove socket 3 (fd=9, id=0x653e819a3c68) DEBUG: Attempting to remove socket 4 (fd=10, id=0x653e819a3cb0) DEBUG: Attempting to remove socket 5 (fd=11, id=0x653e819a3cf8) DEBUG: Attempting to remove socket 6 (fd=12, id=0x653e819a3d40) DEBUG: Attempting to remove socket 7 (fd=13, id=0x653e819a3d88) DEBUG: Attempting to remove socket 8 (fd=14, id=0x653e819a3dd0) DEBUG: Attempting to remove socket 9 (fd=15, id=0x653e819a3e18) DEBUG: Attempting to remove socket 10 (fd=16, id=0x653e819a3e60) DEBUG: Attempting to remove socket 11 (fd=17, id=0x653e819a3ea8) DEBUG: Attempting to remove socket 12 (fd=18, id=0x653e819a3ef0) DEBUG: Attempting to remove socket 13 (fd=19, id=0x653e819a3f38) DEBUG: Attempting to remove socket 14 (fd=20, id=0x653e819a3f80) DEBUG: Attempting to remove socket 15 (fd=21, id=0x653e819a3fc8) DEBUG: Attempting to remove socket 16 (fd=22, id=0x653e819a4010) DEBUG: Attempting to remove socket 17 (fd=23, id=0x653e819a4058) DEBUG: Attempting to remove socket 18 (fd=24, id=0x653e819a40a0) DEBUG: Attempting to remove socket 19 (fd=25, id=0x653e819a40e8) DEBUG: Attempting to remove socket 20 (fd=26, id=0x653e819a4130) DEBUG: Attempting to remove socket 21 (fd=27, id=0x653e819a4178) DEBUG: Attempting to remove socket 22 (fd=28, id=0x653e819a41c0) DEBUG: Attempting to remove socket 23 (fd=29, id=0x653e819a4208) DEBUG: Attempting to remove socket 24 (fd=30, id=0x653e819a4250) DEBUG: Actually removed 25 sockets, failed 0 Remove 25 sockets: 19 us (0.76 us per socket) Total time: 49 us Average per operation: 0.98 us SKIPPING memory stats for corruption testing 🔍 BEFORE_DESTROY: UASYNC Resource Report for 0x653e819a32b0 Timer Statistics: allocated=0, freed=0, active=0 Socket Statistics: allocated=25, freed=25, active=0 Active timers in heap: 0 Socket array capacity: 32, active: 0 Total active sockets: 0 🔚 BEFORE_DESTROY: End of resource report === Benchmark Complete === Array-based socket management provides: - O(1) add/remove operations (vs O(n) for linked list) - Better cache locality for sequential socket processing - Direct FD-to-index mapping for fast lookups - Reduced memory allocations per operation