This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Finding and getting data from a static table (Vectorized Data Query)

I have a big table which inclues values according to parameters like x and y. How can i find a values fast enough without high cpu load?

Parents
  • The only extra information you added was that you had 192 entries.

    Still no information about the full range of the x and z variables and if the table is sparse or if every single x value for the full range of x values has an entry for every single z value.

    I can write 192 as 16x12, so I could guess that that x can take the value 0..15 and y can take the value 0..11. Then you can use a two-dimensional array and perform a direct lookup.

    But if the number of allowed values for x times the number of allowed values for z is more than 192, then you can't. And in that situation, you haven't specified if you just want to know if there is a match in the table, or if you want to find the closest match if an exact match isn't possible.

Reply
  • The only extra information you added was that you had 192 entries.

    Still no information about the full range of the x and z variables and if the table is sparse or if every single x value for the full range of x values has an entry for every single z value.

    I can write 192 as 16x12, so I could guess that that x can take the value 0..15 and y can take the value 0..11. Then you can use a two-dimensional array and perform a direct lookup.

    But if the number of allowed values for x times the number of allowed values for z is more than 192, then you can't. And in that situation, you haven't specified if you just want to know if there is a match in the table, or if you want to find the closest match if an exact match isn't possible.

Children