I m using .htpasswd to protect some dir and .htaccess to ban some ip but can anyone tell me if these files effect my site speed.
Yes, they do, but no one can tell the difference. It is like adding a few more conditional statements in your scripts. I would estimate your site will be 0.001% slower
Like bibel said, they do (as they require processing with each query) but the effect is not noticable, unless you have a really large amount of conditions and/or you ahve a really large amount of traffic (didn't WMW have a problem where they banned so many IPs in the htaccess file it brought the site to a crawl due to the intense traffic they get?)