You can use something like this:
UserInfoProvider.GetUsers().Where(user => user.IsInMembership("MembershipName", SiteContext.CurrentSiteName)).ToArray();
If your base of users is really big, then I will go with some custom query, by combining CMS_Membership and CMS_MemberhsipUser tables to get all UserID's of given membership.
You can also retrieve first Membership id based on name, and then use MembershipUserInfoProvider like this:
var membership = MembershipInfoProvider.GetMembershipInfo("MembershipName", SiteContext.CurrentSiteName);