• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I've got a function I want delted after its called, how?

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The only time you would want to delete a function is if your program used dynamic code generation for optimization (such as a JAVA virtual machines). This however is a very limited use case since dynamic code generation is generally considered unsafe. Since JASS does not allow dynamic code generation (officially atleast) then there is no need to delete a function.

One could argue that removing the function decleration from the namespace would speed up the JASS interpreter by possibly reducing the number of hash collisions. In practice the same effect could probably be achieved by declearing all "limited usage" functions at the end of the map script to assure they are the hardest to reach in the case of a hash collision. This however is mico-optimization which will have limited effect on game performance. In reality reducing commonly called function name length will improve performance much more than any such optimization could.
 
Status
Not open for further replies.
Top