Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

What does 64bit support really mean?

Discussion in 'Unity 5 Pre-order Beta' started by GregMeach, Jan 10, 2015.

  1. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    So far, in the betas the transform.position is still limited to a ~7 digit float, so can we access more memory or what?

    Are "int" values now 64bit (longs?).

    By all means point me to an FAQ with these answers & I'll be off :)
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,169
    64 bit is referring to how much memory the process can access, and how big the pointers are. It hasn't anything to do with the size of the integers or floats.

    http://en.wikipedia.org/wiki/X86-64

    If you're wondering what the limit on memory is, the easy answer is "all that you have". The real answer is that it varies by implementation (anywhere from 64GB up to 256TB of RAM).
     
  3. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,304
    As float is the standard in realtime graphics that goes down even to the hardware, this will very likely never really change. For large worlds (which is the only case where double would give an initial benefit), there's other solutions available out there ;-)

    One very nice article about issues with large worlds is:

    The Continuous World of Dungeon Siege

    Also quite interesting in this context:

    About floating point precision and why do we still use it
     
    GregMeach likes this.
  4. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    The tldr answer is the 64 bit unity editor can use more than 4gb ram. If your system has more, then you'll be able to take advantage of all your ram.
     
  5. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    @GregMeach note that you are actually asking a C# question. The size of float and some other built in types is defined in the C# spec. So both float and int are and will always be 32 bit (e.g., see here). Other parts of C# do however change in a 64bit .NET/Mono environment. The probably wont matter to you as long as you dont call unsafe code or perform low-level bit juggling.
     
  6. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Thank you all for the excellent replies, I've got some reading to do now. :]
     
  7. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,304
    But if graphics hardware and the relevant APIs would support it ... all of them ... it would be possible to switch from float to double. As far as I can see, this is never gonna happen but hey, we have eternity, so I might as well almost certainly be wrong ;-)
     
  8. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Well, it wouldnt be a "switch" (a change of the public interface of the Transform class) because that would break existing code, more a 64 bit extension of the API. I could see that happen in the not so distant future, 32 bit arithmetic really can be a bottleneck...