in reply to Re^5: A question of fork efficiency
in thread A question of fork efficiency

Ask and you shall receive.

Output for your non blocking version:

Good count is 3037 Bad count is 0 Total count is 3037 real 0m24.790s user 0m1.093s sys 0m1.046s

Forking version

Good count is 3037 Bad count is 0 Total count is 3037 real 0m15.358s user 0m10.870s sys 0m19.205s

The forking version is faster up to a point but really puts the CPU through the ringer compared to what you came up with. Once you start hitting around 5k servers or so is when your version starts to shine.