This is not what I would consider a normal time. We have a script that does about 200 If InGroups and it only takes seconds. What is the client u are testing with? Are you checking domain group or local group? It may speed it up if you put the domain name before the group name, especially if you have more than one domain.

If InGroup ("Domain\Group")
Do Stuff
Endif

If you can try to provide some more info about your environment and we will try to help. You may also want to post the contents of the script.