Windows机器中的端口扫描非常慢[关闭]

I am trying to get the active ports and the corresponding protocols using go. I am using a port scanner library named anvie port scanner which is able to fetch the opened ports in linux quickly, but when the same code is run on windows it takes very long time to return the open ports. Why is port scanning slow in windows side?

This is the example which i tried and working fine for linux system.(anvie port scanner) The port range is between 20 to 30000 as mentioned in the example. In windows when I change the port range between 20 to 150 it works, but takes lot of time.