robalo / mods

ASR stuff
GNU General Public License v2.0
23 stars 10 forks source link

fnc_isValidUnit perf optimization #12

Closed dedmen closed 6 years ago

dedmen commented 6 years ago

This makes skip_factions case-sensitive though. Is that important that it stays case-insensitive? Then one could use

private _fac = faction _this;
(GVAR(skip_factions) findIf {_x == _fac}) == -1

Old: 28.6163us find: 6.11624us findIf: 17.1003us

robalo commented 6 years ago

Not a big deal if case-sensitive. One will have to specify the faction exactly as it is, that's fine.