Others have answered your question much as I would, but I would like to add another possibility that no one seems to have offered. Perhaps you already have the "best data structure" -- a file.
I don't know what your requirements are, but assuming your data file is in date order (as it appears to be), the cost of opening and searching through that file may be small enough for you to do it repeatedly. Of course, if "repeatedly" really means "many times per second" that's probably not true :-)
Update: You said in an earlier post that you'll be looking up these values about 8000 times per day, that's about once every 10 seconds which certainly enough time to open and search a file. Especially if you do something smart like keep each days worth of data in separate files rather than all of the data in one big file.
Also, if efficient look up is necessary and your data are coming in at fixed times like that, you could use a hash. Convert the date/time to a GMT value and for each date/time that you want to find the "nearest" barometric pressure, normalize it to one of your fixed times and do a hash lookup
In reply to Re: Data structure advice
by duff
in thread Data structure advice
by robinbowes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |