In theory we have CPU’s that can do millions of things every frame.
e.g:
A CPU running at 3.5 Ghz has time to do about 58,333,333.3 operations a frame.
And when you run a modern multi core cpu you can multiply that by the number of cores or threads.
Who’s stealing/squandering all that gaming processing power?
You could say hey it’s a 3D game you’re reducing your processing power by a third but chips have instruction sets to handle vector/matrix operations even batches of them (MMX, SSE, SSE2, SIMD ect).
And even at a third you still have about 19,444,444 3D operations a frame?
Example test code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Diagnostics;
public class OneFrameTest : MonoBehaviour {
List<int> counters;
Stopwatch timer;
void Start () {
counters = new List<int>(frames);
timer = new Stopwatch();
}
int frames = 100;
int counter;
void Update() {
if (frames > 0)
{
timer.Reset();
timer.Start();
counter = 0;
do
{
counter++;
} while (timer.ElapsedMilliseconds < 16l);
counters.Add(counter);
}
if (frames == 0)
{
for (int i = 0; i < counters.Count; i++)
{
print(i + " : " + counters[i]);
}
}
if (frames >= 0) frames--;
}
}
Results on my machine in Unity:
23 : 191496
24 : 191706
25 : 191835
26 : 191953
27 : 191625
28 : 191891
29 : 191696
30 : 187944
31 : 191885
32 : 190361
33 : 190641
34 : 191200
35 : 191646
36 : 191955
37 : 191502
38 : 190452
39 : 189946
40 : 203891
41 : 191700
42 : 191511
43 : 192046
44 : 191733
45 : 188930
46 : 197201
47 : 189692
48 : 190824
49 : 195638
50 : 187880
51 : 187643
52 : 190388
53 : 190285
54 : 189610
55 : 189504
56 : 198415
57 : 190303
58 : 191159
59 : 188409
60 : 189778
61 : 196251
62 : 191237
63 : 198426
64 : 188969
65 : 190379
66 : 188860
67 : 191096
68 : 191153
69 : 188934
70 : 191743
71 : 190792
72 : 190204
73 : 188921
74 : 191005
75 : 188810
76 : 188735
77 : 189483
78 : 190817
79 : 189095
80 : 187751
81 : 189009
82 : 198746
83 : 188778
84 : 188894
85 : 190369
86 : 191731
87 : 190610
88 : 191025
89 : 189469
90 : 188812
91 : 189051
92 : 190186
93 : 191331
94 : 189507
95 : 189101
96 : 194340
97 : 190848
98 : 190904
99 : 190922
Around 190,922 additions and comparisons per a 16ms frame or about 381,844 ops.
Which is a lot less than the 58,333,333 ops a 3.5 Ghz cpu should be able to do in 16ms.
OK there is the OS, Unity, .Net Mono then the CPU but this looks like I’m only seeing 1/152th of the raw gaming power I should be getting.
So, where does it all go?*
Or is there a good reason MS are bringing out a game mode to the OS?
