- Home /
 
               Question by 
               Twinny · Sep 03, 2013 at 12:25 AM · 
                vector3performancevector2  
              
 
              Vector2 vs Vector3 performance?
the answer to this is probably pretty obvious but would it be a better idea to use vector 2 instead of vector 3 if you aren't going to alter the z axis? as in would it result in a lower performance cost?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by morvern · Sep 03, 2013 at 01:11 AM
try instantiating a Vector2 and performing some operations in a loop, wrapped in a System.Diagnostics.Stopwatch
Then do the same with a Vector3 and compare results
 using System.Diagnostics;
 // ...
 
 Stopwatch sw = new Stopwatch();
 
 sw.Start();
 
 // ...
 
 sw.Stop();
 
 Console.WriteLine("Elapsed={0}", sw.Elapsed);
Your answer
 
 
             Follow this Question
Related Questions
Get a position relative to a gameobject 0 Answers
greater or less than with vector coordinates 0 Answers
Get RaycastHit Local Coords (C#) 1 Answer
Rigbody 2D Velocity Mystery 1 Answer
Set speed by distance from object 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                