• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,202
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