• 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!

[Solved] Which one takes up more memory: 4 reals or 1 rect?

Status
Not open for further replies.

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,551
Hello there.
I've been tinkering with structs for the past few months and have ran across a doubt: which one will take more memory: 4 reals or 1 rect? The reals are the rect's minX,minY,maxX,maxY.
JASS:
    real minx
    real miny
    real maxx
    real maxy
Using a rect also makes the create function shorter, but I will only create a fix number of these structs and they'll last for the entire game.


Thank you in advance!
 
Rect also includes the creation and handling of the region behind it. I think that working with the 4 reals is faster.
 
  • Like
Reactions: Rui
Status
Not open for further replies.
Back
Top