Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pre-allocating up front would also have been valid way of doing things.

For the specific use cases I have worked on though, I'm not sure it would have had any additional performance benefits. The specific class of systems I've worked on usually have only a few sockets which open at the start of a day and stay connected until the end of a day. Pre-allocating would make the socket opening process faster but that is not usually the part of an application life cycle that needs optimising. If there were lots of sockets opening and closing or the speed of opening and closing needed optimisation, then what you suggested would be a good idea.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: