Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Constants versus globals performace  (Read 2411 times)

0 Members and 1 Guest are viewing this topic.

Mihulik

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 71
    • View Profile
Constants versus globals performace
« on: February 04, 2012, 11:04:15 PM »

Hi,
I was wondering whether there's any performance difference between using constants and using globals.
Especially, if I changed globals to constants, would it make saving/loading quicker?

Thanks:)
« Last Edit: February 04, 2012, 11:07:34 PM by Mihulik »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Constants versus globals performace
« Reply #1 on: February 05, 2012, 10:04:37 AM »

No, not really. They are treated exactly the same, except constants are not zeroed when you call Game.Reset().
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mihulik

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 71
    • View Profile
Re: Constants versus globals performace
« Reply #2 on: February 05, 2012, 10:44:30 AM »

I expected that - just wanted to be sure. :)
Thanks :)
Logged
 

Page created in 0.041 seconds with 19 queries.