- Joined
- Jul 11, 2006
- Messages
- 38
I'm not really sure if this fits in this forum, but since it's about the interface's compiler I guess it sort of applies.
I've been curious about just what kind of efficiency operations the WC3 compiler does for the final map script (regardless of how it's arrived at, interface-generated or manually coded). I haven't ever had the time to look into the details of how much of maps are compiled vs interpreted; is most of it interpreted?
If a lot of a map is compiled, are things like duplicate instantiations of an object combined (like MS's VC++ compiler does)?
For example, if there are two calls to taking the point that is the center of a region (I'm guessing it creates a new instance of the point class for this purpose, hence all the talk over the years about leaks) does it refer all future calls back to the same instantiated object in memory, or create a new, identical instance of the point class for each individual call? I'm guessing it's the latter, or people wouldn't worry about memory handling so much (after all, quantity of memory used is usually a low concern nowadays unless you're dealing with integrated systems).
I still do all the destroy-instance-of-object operations to be on the safe side, but I sometimes wonder just what the exact tradeoffs are of that, vs the time needed to run the destructors (and hence the memory access operations associated with them, which are rather time consuming as far as most operations go if I remember my computer architecture correctly).
MS's compiler for visual studio is rather remarkable (regardless of any other questionable points as a company you might have of them) at optimizing the final assembly product when you churn something out in release mode... you wouldn't expect a compiler for custom maps in WC3 to be that professional of course, but I still wonder at times just how much efficiency handling, if at all, is done, if there's a reference to specifically how the compiler operates at a lower level somewhere.
I've been curious about just what kind of efficiency operations the WC3 compiler does for the final map script (regardless of how it's arrived at, interface-generated or manually coded). I haven't ever had the time to look into the details of how much of maps are compiled vs interpreted; is most of it interpreted?
If a lot of a map is compiled, are things like duplicate instantiations of an object combined (like MS's VC++ compiler does)?
For example, if there are two calls to taking the point that is the center of a region (I'm guessing it creates a new instance of the point class for this purpose, hence all the talk over the years about leaks) does it refer all future calls back to the same instantiated object in memory, or create a new, identical instance of the point class for each individual call? I'm guessing it's the latter, or people wouldn't worry about memory handling so much (after all, quantity of memory used is usually a low concern nowadays unless you're dealing with integrated systems).
I still do all the destroy-instance-of-object operations to be on the safe side, but I sometimes wonder just what the exact tradeoffs are of that, vs the time needed to run the destructors (and hence the memory access operations associated with them, which are rather time consuming as far as most operations go if I remember my computer architecture correctly).
MS's compiler for visual studio is rather remarkable (regardless of any other questionable points as a company you might have of them) at optimizing the final assembly product when you churn something out in release mode... you wouldn't expect a compiler for custom maps in WC3 to be that professional of course, but I still wonder at times just how much efficiency handling, if at all, is done, if there's a reference to specifically how the compiler operates at a lower level somewhere.