I’d like to be able to query an array (multi and single dimensional ) with something like SQL. Is there a way to do this?
It just seems extraordinarily wasteful to step through it one record at a time.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nope. Do you wasteful in terms of having to write the loop, or performance wise? I’d expect heaping a layer of abstraction over the array would hinder performance.
If you need to search your arrays in something other than linear time (ie., one at a time), you’ll need to organize them so that you can so a binary search over them (or any number of other algorithms).