Advertisement

Lookup Tables

Started by October 13, 2002 11:06 AM
3 comments, last by h0-0t 22 years, 1 month ago
I have a 256k lookup table, and I think I have to trash it (for obvious reasons). I am just curious to know if there is a difference between LUT''s that are created on runtime and those that are hardcoded(ie LUT[] = {1,2,3,4,5,6....n-1, n} Would it be possible to use such a LUT if it were hardcoded? I am aware that the runtime version pretty much kills my cache... Thank you
:: h0-0t ::
i think it depends on you, with runtime, you have to generate the algorithm for it, with hard coding, you don''t,
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Advertisement
Generating the table is simple....I did it already. I also have the hardcoded version.

I had posted in the Math and Physics forum and I got replies about my code being terrible because a 256k lookup table would take up my P4''s l2 cache.
:: h0-0t ::
You should always try to hard-code your lookup tables if possible because then you don''t spend the time creating the tables during game-time. Write a program to output a lookup table (in c++ or whatever your using syntax) given your algorithm. That''s what ID software does anyways...and that makes the most sense.

---
My Site-My Tetris Clone w/Source
Come join us on IRC in #directxdev @ irc.afternet.org
Hahaha you think the same way as I do

That''s how I did it...I wouldn''t have typed out 65552 entries by ahnd....I''m aspiring to be a programmer, therefore I am lazy by nature
:: h0-0t ::

This topic is closed to new replies.

Advertisement