Burst 1.2 comes with a new feature: SharedStatic<T>
. This allows us to write to static variables from within Burst-compiled code like jobs and function pointers. Today we’ll look at how this is implemented by Burst and IL2CPP. We’ll also put them to a performance test to see how fast they are.
Posts Tagged il2cpp
Last week we learned a lot about Allocator.Temp
, but we left some questions open. One of them was what happens when we explicitly deallocate Temp
memory. We know we don’t need to and that it’ll be deallocated at the end of the frame, but what happens when we explicitly deallocate it? Today we’ll dive in and try to find out.
Ever wonder how code compiled with IL2CPP can call code compiled by Burst? Today we’ll dive into the details and find out!
Continuing the series, today we’ll dive into local functions, fixed
-size buffers, fixed
blocks on arbitrary types with GetPinnableReference
, and stackalloc
initializers to see how they’re all implemented in C++ and what assembly code ends up actually running on the CPU.
Last week we started exploring the new features of C# 7.3 in Unity 2018.3 by delving into tuples. This week we’ll continue and look at pattern matching. Read on to see how the many forms of pattern matching are actually implemented by IL2CPP!
Unity 2018.3 officially launched last Thursday and with it comes support for the very latest version of C#: 7.3. This includes four new versions—7.0, 7.1, 7.2, and 7.3—so it’s a big upgrade from the C# 6 that we’ve had since 2018.1. Today we’ll begin an article series to learn what happens when we use some of the new features with IL2CPP. We’ll look at the C++ it outputs and even what the C++ compiles to so we know what the CPU will end up executing. Specifically, we’ll focus on the new tuples feature and talk about creating, naming, deconstructing, and comparing them.
Last week’s article tested the performance of the async
and await
keywords plus the C# Task
system against Unity’s new C# jobs system. This week we’ll go in depth with async
and await
to learn how they work, how they relate to the Task
system, and how we can customize them for our own uses.
Today we’ll look at the C++ code that IL2CPP outputs when we use iterator functions (those that yield
), switch
statements, and using
blocks. What are you really telling the computer to do when you use these C# features? Read on to find out.
(Website Announcement: check out the new tags page to find articles by topic)
NativeArray<T>
is a new type introduced recently in Unity 2018.1. It’s like List<T>
except it’s backed by an unmanaged array instead of a managed array. It’s also a struct instead of a class. This means it creates no garbage for the GC to later collect. That’s the surface level description, but today we’ll go in depth to find out how it really works and learn some interesting facts along the way.
Unity 2018.1 was released last week and with it comes support for C# 6. Today we’ll take a look at the C++ that IL2CPP generates when we use the new features in C# 6. Warning: one of them is buggy and shouldn’t be used.