Search Unity

Yes Unity 5.5 new compiler and GC!

Discussion in 'General Discussion' started by Arowx, Jun 1, 2016.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    https://twitter.com/unity3d/status/737920987249967106

    Thank You Unity!

    Darn it though with instancing, IL2CPP on all platforms (see slide 5.4) and a new GC I'll have nothing to complain about...

    Hmm, any chance you could you know add GPU parallel processing to C#, Please?

    EDIT: Might be in here?
     
    Last edited: Jun 1, 2016
    Meltdown, Ryiah and hippocoder like this.
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You'll find something ... :D
     
  3. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    It only says 5.5 will have new compiler but not the others or else the 5.5 would be in the main entry?

    With the current pace of the betas and coming summer + holidays, 5.5 sounds like it's coming at the end of the year and then its already close to Unity 6 next year... very depressing in the light of the new pricing scheme.

    I hope someone who attended the roadmap session can prove me wrong :)
     
    Brity likes this.
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'd love more info on the new compiler and GC :)
     
    dogzerx2 and McMayhem like this.
  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    You need to look at the photos they have taken of the slides.

    Hopefully they will put the video up of this session?
     
  6. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I don't get what's with the instancing stuff... why custom shaders? Shouldn't it just be if meshes are identical they are instanced?
     
    darkhog likes this.
  7. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Good point. There is probably overhead for instancing, e.g. shared arrays, set up, which could be wasted when you only have a few things. A bit like using SIMD or Multi-threading, only worth doing if there is a big enough 'batch' to process to make it worth the overhead.
     
  8. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Yes, that's what I was looking at. Even the twitter post says only about compiler in 5.5 which does not include everything. For the rest they have been under works or research for years which does not mean much for the other points :)
     
  9. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    Good stuff.
     
  10. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    The way Mono/.NET works if you upgrade your version you tend to get a newer GC right?

    The latest versions have some great GC updates for high performance servers that could be ideal for games.

    Good but dated 2014 article here -> http://mattwarren.org/2014/06/18/measuring-the-impact-of-the-net-garbage-collector/

    Or Unity could adopt something like this -> http://www.philosophicalgeek.com/2015/02/06/announcing-microsoft-io-recycablememorystream/
     
    Last edited: Jun 1, 2016
  11. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Well they are talking only about compiler for 5.5. You can even use Roslyn with Unity currently if you set it up. However AFAIK the gc is part of the runtime or separate thing they customized to work with mono or IL2CPP.
     
  12. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Last line under .Net/MONO Upgrade (Yay!) section GC!
     
  13. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Yes, GC is just one step under the topic just like compiler is as first step of em all and planned for 5.5, or that's how I see it.
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Did you actually watch the video? You misread the slides. You should listen to what Ralph actually said.

    upload_2016-6-1_17-8-4.png
     
    elbows, elmar1028, Brity and 4 others like this.
  15. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Just watching the video now. Was going off the indentation and limited information on the slides and my now collapsed optimism. :(
     
    landon912 likes this.
  16. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Start on game now and by the time finished you get new garbage collection and perhaps some additional all around bit of increased performance as well. :)
     
  17. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    You still need to code correctly :p
     
    Stormy102 and angrypenguin like this.
  18. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
  19. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    Yes you still need to code correctly even with a improved GC compiler. Or to say it more correctly. "You still need to take responsible for what your codes does". Avoiding repeated allocation is not that difficult. But allocation that comes from the UI or Unity engine/editor it self, it something i am looking forward to see improvements on. Specially on canvas and UI elements. But IL2CPP is def the right direction for Unity. But you still need to code correctly :)
     
    Last edited: Jun 1, 2016
  20. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    We have had this conversation before we disagree -> http://forum.unity3d.com/threads/mono-garbage-collection-can-i-get-a-summary.228199/

    But it's good to see that Unity is working on the a solution to the problem and have a 'roadmap'.
     
  21. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    Maybe you missunderstand what the new improvements are. You still need to code correctly. Its not a problem its a lack of understanding.IL2CPP will not remove gc, its mostly translation performance to c++ native. There is no roadmap to remove gc.
     
  22. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    @Arowx, at some point in the later half Joachim says that they are moving the rendering nuts n bolts from the C++ black box into a ~500 lines of C# file. Available in a repo near the cinematic image effects, @soon. This will be a huge step towards custom-tailored rendering and will facilitate custom GPU compute solutions in platforms where such an approach makes sense.
     
    Brity and tatoforever like this.
  23. kaiyum

    kaiyum

    Joined:
    Nov 25, 2012
    Posts:
    686
    Do not allocate and you do not have to worry about GC. I know its pain but certainly less pain than handling multiple pointer indirection. In iL2CPP route we can skip this GC thing altogether, right? ;)
     
  24. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    You can't avoid allocation, but we can certainly avoid reallocation. The problem is that internally Unity modular component generates allocation without you doing any codes at all, this should be fixed. IL2CPP is still managed code at start. It just increase the performance from intermediate language to unmanaged code. When memory blocks is no longer in use, it needs to be cleaned for new allocation. How this cleanup happens can be improved, but never removed. IL2CPP comes with a upgraded version of the collector (a better one). Mostly this updates are monobehavoir/compiler . It will be nice to see 4.6 .Net support. Allot of new interesting improvements are coming.. Good news. but not groundbreaking. I love how Unity thinks and the way things are going.
     
    Last edited: Jun 2, 2016
  25. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,971
    Hey, does compiler upgrade mean faster script compiling?
     
  26. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Well, for some time it essentially means bugs.
    :)
     
  27. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Was also excited about the IL2CPP everywhere, but if you watch the video (11:45) a question is asked about Standalone IL2CPP and it's being pushed back behind the mono upgrade.

    Should the inability to compile on Mac for PC native be a blocker, and could cloud build get around this problem?
     
    Last edited: Jun 2, 2016
  28. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    ILCPP will come for desktop, eventually, after a Mono upgrade.
    Cloud Build accelerates building and distributing builds on multiple platforms - devices.
    ILCPP for desktop currently is not available as a build target, so Cloud Build cannot help on this.
     
  29. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I know it was the developer using the fact that you cannot build/compile to PC from a Mac as the 'reason' for why this has not been added.

    For instance you can't build for iPhone or Mac without a Mac. :rolleyes:

    But cloud build should allow developers on any platform to built to a supported target platform, right? :eek:

    Even the CEO in the Keynote mentioned the PC platform being a good option for game developers.:rolleyes:
     
  30. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    dont quote 'reason'; it's pretty valid reason - you cannot use Apple's dev stack on you Windows legally
    and yes, cloud build might help overcome this - but that is so far in the future that not one, not even two, but several threads will be made about it until then
     
  31. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I do wonder though how much of a performance boost PC games would get from a native IL2CPP build?
     
  32. Ironmax

    Ironmax

    Joined:
    May 12, 2015
    Posts:
    890
    while we talking about IL2CPP for does who haven't seen this yet:


    My solute to Lucas & Ralph
     
  33. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I'm kinda excited for those custom renderloops. It would allow for finetuning rendering code to the way your game works so you can e.g. detect objects that would fill large portion of the screen and are non-transparent so you can avoid rendering anything behind them that is either very far or very small so it wouldn't be visible anyway. Basically avoiding overdraw.