- Joined
- Jul 6, 2009
- Messages
- 1,885
I've started working on a spell and I've got a question.
In this spell, there are multiple objects which i use structs for, however, the objects are very similar except each has a different method. This method should be, for each object type, executed each 0.03 seconds for which i use T32.
Now, i've got 2 ways of doing it and my question is which is better.
-I thought about using 1 struct that would have multiple methods, for each object type. Each instance of this struct would have a trigger member that would have one of these methods assigned as it's condition upon instance creation so i can evaluate the trigger member in a method ran by T32 to fire each instance's corresponding method.
-The second way would be to make a struct for each object type. While in this way, i would avoid trigger evaluations which are slow, as far as i know, i would also have to implement T32 in each struct which would make multiple loops and additional methods for each struct. Also the only difference between those structs would be 1 method :/
TL;DR Are trigger evaluations really that slow or it doesn't matter that much?
In this spell, there are multiple objects which i use structs for, however, the objects are very similar except each has a different method. This method should be, for each object type, executed each 0.03 seconds for which i use T32.
Now, i've got 2 ways of doing it and my question is which is better.
-I thought about using 1 struct that would have multiple methods, for each object type. Each instance of this struct would have a trigger member that would have one of these methods assigned as it's condition upon instance creation so i can evaluate the trigger member in a method ran by T32 to fire each instance's corresponding method.
-The second way would be to make a struct for each object type. While in this way, i would avoid trigger evaluations which are slow, as far as i know, i would also have to implement T32 in each struct which would make multiple loops and additional methods for each struct. Also the only difference between those structs would be 1 method :/
TL;DR Are trigger evaluations really that slow or it doesn't matter that much?