HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Function chains = good or bad?

03-29-2005, 02:23 PM#1
qwertyui
Here is the q:

Function IsUnitAliveBJ(Unit) when executed calls up function IsUnitDeadBJ(Unit), which calls up function GetUnitState(Unit, Integer).

So i was wondering, does that mean that in order to optimise performance i always have to call GetUnitState when i want to check if unit is alive, or am i ok with calling IsUnitAlive?
03-29-2005, 02:46 PM#2
PitzerMike
You're right, it is better to call the native functions directly, but the difference is not very big.
Tools like Lord Vexorian's optimizer or JASSParse can clean the code up for you as soon as you've finished the map. This includes replacing BJ wrapper and swapper functions with their common.j equivalents.
03-29-2005, 11:05 PM#3
Vexorian
Quote:
Originally Posted by qwertyui
Here is the q:

Function IsUnitAliveBJ(Unit) when executed calls up function IsUnitDeadBJ(Unit), which calls up function GetUnitState(Unit, Integer).

So i was wondering, does that mean that in order to optimise performance i always have to call GetUnitState when i want to check if unit is alive, or am i ok with calling IsUnitAlive?
Actually you should call GetWidgetLife
03-30-2005, 04:39 AM#4
qwertyui
Does your really optimiser do this all automatically Lord Vexorian?
Also, will your optimiser work with the new Widgetiser tool for making SLK tables?
03-30-2005, 10:23 PM#5
Vexorian
1) I wouldn't call it Optimizer if it didn't
2) I don't know