News for hackers. Stuff that matters.
Re:Porting the Unity Engine to .NET CoreCLR by doomlaser on Tuesday April 10, 2018 @06:14PM (#16806033)
They put up their editor source code on Github recently (https://github.com/Unity-Technologies/UnityCsReference), and originally it also included the full source to their runtime garbage collector, which ended up being the standard open source C++ boehm collector (https://github.com/ivmai/bdwgc) from the 90s.

Unity should replace it with a reference counting object management system, or update to a newer garbage collection technique to minimize the inadvertent sweeps that cause huge choppy frame rate drops.

Re:Porting the Unity Engine to .NET CoreCLR by merlish on Wednesday April 11, 2018 @05:37AM (#16809442)
They're planning both. Reference counting/bump pointer allocation in-frame for temp stuff & no GC & manual memory management for the upcoming high-performance restricted C# subset data-oriented jobs code, and for full-fat real C# code they're slowly working to clean up their (C++ coded) runtime so that a non-conservative garbage collector can work.

Re. Boehm, that was the garbage collector Mono shipped until they wrote SGen some years back.

I'm quite excited by the work they're doing on performance. It looks great.

Re:Porting the Unity Engine to .NET CoreCLR by pcwalton on Tuesday April 10, 2018 @06:16PM (#16806054)
I hope they don't use naive reference counting. It would reduce throughput and would not eliminate pauses. A standard incremental or concurrent generational tracing GC would be a better choice. In games you have a lot of knowledge about timing that you can use to help schedule GC: you always know (or should know anyway) how much time there is until the next VBLANK, so you can use that to bound pause times for your major collections.
Re:Porting the Unity Engine to .NET CoreCLR by doomlaser on Friday April 13, 2018 @10:19AM (#16830217)
Large parts of iOS and its ecosystem use automatic reference counting, and it has a reputation for the interface being noticeably smoother than Android, which uses Java's garbage collector.
Re:Porting the Unity Engine to .NET CoreCLR by pcwalton on Sunday April 15, 2018 @07:17PM (#16845594)
Android doesn't use the HotSpot garbage collector.