Download DIPLOMA THESIS - IIS Windows Server

Transcript
11 Results
relative values (speed) are computed from results of non-managed (Win32) version (TWin32)
and managed version (Tresult) of particular test:
Relative value then means percentage non-managed version speed, i.e. value equal to 1.000
means no slowdown and no speedup at all, value that is less then 1.000 means slowdown.
11.1 Test 1: Built-in Value Types
First test is based on that fact that majority of OpenGL functions uses built-in value types
as their parameters. This means that built-in value types are used quite often and therefore
significant slowdown of sharing them between managed and non-managed code would
cause significant decrease of whole OpenGL code performance. Test uses glVertex2d
function that has two parameters that both are double. Test results can be found at Figure
11.1.
This*
1.020
This
1.015
CsGL
Speed
1.010
Non-managed Win32
1.005
1.000
0.995
0.990
0.985
0.980
1000
10000
100000
log(Call No.)
Call No.
CsGL
This
This*
1000
1600
2500
4000
1.000
1.002
1.000
1.001
1.000
1.003
1.001
1.001
0.997
1.000
0.998
0.999
* version with parameter checking
Test 1 Results
6300 10000 16000
1.001
1.001
1.001
1.002
1.002
1.002
1.000
1.000
1.000
25000
1.000
1.001
0.999
40000
1.000
1.001
0.999
63000 100000 average
1.000
1.000
1.000
1.001
1.001
1.001
0.999
0.999
0.999
Figure 11.1: Test 1 results
Results of this test leads to a conclusion that there is no significant slowdown due to data
sharing of built-in value types. Average results are very close to speed of non-managed
version for both CsGL and this work even for version with parameter checking.
71