Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Save the coords or calculate every time

Comments in 'Plugin Development' started by Legoboy0215, Mar 29, 2016.

  1. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    I have about 300 strings (coords like this: x:y:z) in an array (or JSON?). Should I save the array (cache or whatever it is called) or calculate it every time I execute the function? Does saving it in an array cosume more RAM or memory? I am not so sure so...
  2. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    Legoboy0215 and applqpak like this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Uhh... How do you compare time with memory usage?

Share This Page

Advertisement