it sounds like you will have your information loaded every once in a while from a PC why not have your pc upload a sorted list then binary search the mmc. -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Kresho Sent: Thursday, April 22, 2004 10:58 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC:] Sorting through millions of numbers Thanks for all the replies. > I assume this is for something comparable to a car wash system - > you buy a > "ticket" which is recorded in the system and it is removed once utilised. Good guess but not quite. What it's for is a snack promotion. People will receive a card encoded with a number. This number is stored with the time/date as previously specified. Then the card holder swipes their card on a vending machine to get their free snack. There will obviously be a limited time for them to redeem said snack, and that's why the date is required. > You didn't mentioned "PIC" one single time, but I'd guess that > that's what you'd like to use, right ? :-) Yes, or something similar. I'm dabbling with some hitachi H8s at the moment which might be a better fit for this application. The b-tree and hashing schemes seem like a possibility. However, I think Adam's response with his practical analysis is probably fitting here. If the limited time for redemption is kept short enough I can just go through the data every now and then and delete expired entries and keep the list lean. If i come up with another solution i'll keep you posted. Rgds, Kresho Sprem -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics