• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Which is faster?

Status
Not open for further replies.
Level 2
Joined
Nov 29, 2021
Messages
8
I'm currently writing a dummy system and I want it to have a sanity check, which of the options is faster and what happens with LoadBoolean() if the hashtable is empty at that spot?

Edit: How would HaveSavedBoolean() compare to those two?
 

Attachments

  • What is faster.PNG
    What is faster.PNG
    5.7 KB · Views: 106
Last edited:
Hashtable lookups are assumedly faster. IsUnitInGroup() has to enumerate over the entire Unit Group until it finds the desired unit and I imagine there's more to it than just that which would make it slower.

Go with either LoadBoolean() or HaveSavedBoolean(). I can't say which of these 2 is faster but it's probably such a small difference that you couldn't possibly tell the difference in-game.
 
Status
Not open for further replies.
Back
Top