[Mono-dev] Mono SIMD Function Declarations and Timing

JTalton talton at gmail.com
Fri Nov 21 09:17:43 EST 2008


Testing:
  Array of 10000000 vectors performing different Add declarations across
those vectors.
  Test run 10 times and average of runs taken. (Looking at data, timing is
consistent between runs)
  Executable was built on Windows using VS2008 with the project settings set
to .NET 2.0 - Release
  VC - Vector Class
  VS - Vector Struct
  Arrays were initiailized before any tests were run.

.NET 2.0 - Windows XP - 18 Seconds
1.000 VS: void Add(ref VS a)
1.018 VS: void Add(VS a)
1.035 VS: void Add(ref VS a, out VS result)
1.052 VS: void Add(VS a, out VS result)
1.163 VC: void Add(VC a)
1.374 VS: static void Add(VS a, VS b, out VS result)
2.543 VC: static void Add(VC a, VC b, out VC result)
2.250 VC: static VC operator +(VC a, VC b)
2.259 VC: static VC Add(VC a, VC b)
2.594 VC: void Add(VC a, out VC result)
2.668 VS: static VS operator +(VS a, VS b)
2.700 VS: static VS Add(VS a, VS b)

Mono 2.0.1 - Windows XP - 63 Seconds
 1.000 VS: void Add(ref VS a)
 1.123 VS: void Add(ref VS a, out VS result)
 1.281 VC: void Add(VC a)
 1.670 VS: void Add(VS a)
 1.786 VS: void Add(VS a, out VS result)
 2.628 VS: static void Add(VS a, VS b, out VS result)
 2.857 VS: static VS operator +(VS a, VS b)
 2.859 VS: static VS Add(VS a, VS b)
12.895 VC: static VC Add(VC a, VC b)
13.223 VC: void Add(VC a, out VC result)
13.242 VC: static void Add(VC a, VC b, out VC result)
13.453 VC: static VC operator +(VC a, VC b)

Mono 1.9.1 - Ubuntu 8.10 Live CD
1.000 VS: void Add(ref VS a)
1.106 VS: void Add(ref VS a, out VS result)
1.294 VC: void Add(VC a)
1.669 VS: void Add(VS a)
2.101 VS: void Add(VS a, out VS result)
2.111 VS: static void Add(VS a, VS b, out VS result)
2.694 VS: static VS Add(VS a, VS b)
3.105 VS: static VS operator +(VS a, VS b)
5.007 VC: static VC Add(VC a, VC b)
5.126 VC: void Add(VC a, out VC result)
5.280 VC: static void Add(VC a, VC b, out VC result)
5.287 VC: static VC operator +(VC a, VC b)

I agree that there is nothing new here.  I just wanted to point the
performance implications of the function declarations out so that when the
function declarations are decided on, it would be taken into consideration.
-- 
View this message in context: http://n2.nabble.com/Mono-SIMD-Function-Declarations-and-Timing-tp1559946p1561887.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list