Matrix4 benchmark results

Posted in  |  |  | .  

The benchmark measured the time (in seconds) of 1,000,000 random matrix multiply operations on the different matrix implementations.
The test used the latest Sharp3D.Math build (compiled using VS2003), DirectX october update and VS2005 beta 1.

The results are:

  1. Sharp3D.Math.Core.Matrix4F - 0.2857308100 seconds
  2. Matrix4<float> C# Kernel - 0.3076677100 seconds
  3. Matrix4<float> DirectX Kernel - 0.9436617200 seconds
  4. DirectX - 0.1269457500 seconds.

As expected, the DirectX CPU optimized code runs the fastest.

I thought that using a DirectX kernel will make Matrix4<float> faster than using a C# implementation but it seems that the Matrix4<float> <--> Microsoft.DirectX.Matrix conversions are killing the performance benefits...

I expected the generic Matrix4 C# implementation to run just as fast as its non-generic counterpart but unfortunately it is slower. This is probably caused by using an interface for the kernel operations...

If anyone has an idea about how to make the conversion too\from DirectX faster and\or how to make the C# implementation just as fast as its non generic counter part I'd appreciate a comment or mail...

Comments are closed.

About

Eran Kampf draws upon 8+ years of experience in software development and research. Eran served in the IDF's elite geospatial-intelligence as a senior software developer and is currently working at SAP as an R&D Engineer working on Duet which is jointly developed by SAP & Microsoft.
AddThis Feed Button Give Feedback

On this page...

Recent Comments

Tags

Statistics

Total Posts: 481
This Year: 61
This Month: 0
This Week: 0
Comments: 281

Google Ads