Posts Tagged cache

Can Fixed-Point Improve Performance?

Tags: , , , ,

Fixed-point types save memory compared to floating-point types, but can they also improve performance? Today’s article finds out!

Read the rest of this article »

3 Comments

Fast Structs

Tags: , ,

Structs are great for controlling memory layout and avoiding the GC, but we can go a lot further to get even more speed out of them. Today we’ll look at a simple tweak that can dramatically speed up the code using the structs without even changing it!

Read the rest of this article »

8 Comments

NativeIntPtr and NativeLongPtr: Part 2

Tags: , , , ,

Last week’s article introduced two new native collection types: NativeIntPtr and NativeLongPtr. These were useful for both IJob and IJobParallelFor jobs, but performance was degraded in IJobParallelFor. Today we’ll remedy that, explore some more aspects of Unity’s native collection and job systems, and learn more about CPU caches along the way.

Read the rest of this article »

6 Comments

C++ Scripting: Part 20 – Performance Improvements

Tags: , , ,

The last time we looked at performance was way back in part four of the series. Ever since then we’ve been relentlessly adding more and more features to the C++ scripting system. So today we’ll take a break from feature additions to improve the system’s performance in a couple of key areas.

Read the rest of this article »

2 Comments

The Other CPU Cache

Tags: , , , , , ,

We’ve seen how using the CPU’s cache can lead to a 13x speedup, but that’s only utilizing one of the CPU’s cache types. Today’s article shows you how to go further by utilizing a whole other type of CPU caching!

Read the rest of this article »

6 Comments

How to Use the Whole CPU

Tags: , , , , ,

Last week’s article showed how to effectively use the CPU’s caches to boost performance by an order of magnitude. Today’s article goes even further to show you how to use even more of the CPU’s capabilities!

Read the rest of this article »

12 Comments

How to Write Faster Code Than 90% of Programmers

Tags: , , , ,

Most programmers write code for an abstract computer. The thing is- code runs on a real computer that works in a specific way. Even if your game is going to run on a wide range of devices, knowing some of the common features can speed up your code 10x or more. Today’s article shows you how!

Read the rest of this article »

66 Comments

Better CPU Caching with Structs

Tags: , , , ,

While little utilized, C#’s struct type can come in really handy sometimes. Today’s article shows how to use it to get a lot more mileage out of modern CPUs’ caches to really boost your app’s performance. Read on for some quick tips!

Read the rest of this article »

5 Comments