This needs a different approach

Ary Borenszweig ary at esperanto.org.ar
Mon Apr 28 18:04:57 PDT 2008


Saaa escribió:
>> Premature optimization is bad.
>>
>> Try doing it that way, and only optimize it if you see it's working 
>> slowly.
>>
> 
> What is bad about function tables?
> Implementing function tables should be easy, I think :)
> At least a lot less work than rewriting everything into classes.
> 
> I'm not optimizing, I'm simply deciding which approach is best.
> 
> Why would using function tables be an optimization? 

I just mentioned optimization because you said "Changing an item is more 
costly than changing a number. (A lot of the items get changed 30 times 
per second)".

I'm more into solving this using classes and inheritance. If the 
compiler can do the function table for you, why bother?


More information about the Digitalmars-d-learn mailing list