Mercurial > hg > Members > kazuma > JungleforUnity
comparison Assets/Application/Scripts/Test/GetComponentTest.cs @ 12:b55d586dd4eb
change bind from fmap.
author | Kazuma Takeda |
---|---|
date | Tue, 07 Feb 2017 20:48:57 +0900 |
parents | 599bd8ddb72b |
children |
comparison
equal
deleted
inserted
replaced
11:cf20add31466 | 12:b55d586dd4eb |
---|---|
26 GameObject obj = Resources.Load ("Prefabs/Box/Wood") as GameObject; | 26 GameObject obj = Resources.Load ("Prefabs/Box/Wood") as GameObject; |
27 } | 27 } |
28 st.Stop (); | 28 st.Stop (); |
29 total_as += st.Elapsed.TotalMilliseconds; | 29 total_as += st.Elapsed.TotalMilliseconds; |
30 | 30 |
31 // Stopwatch st = new Stopwatch (); | 31 st = new Stopwatch (); |
32 // st.Start (); | 32 st.Start (); |
33 // for (int i = 0; i < 10000; i++) { | 33 for (int i = 0; i < 10000; i++) { |
34 // GameObject obj = Resources.Load<GameObject> ("Prefabs/Box/Wood"); | 34 GameObject obj = Resources.Load<GameObject> ("Prefabs/Box/Wood"); |
35 // } | 35 } |
36 // st.Stop (); | 36 st.Stop (); |
37 // total_generic += st.Elapsed.TotalMilliseconds; | 37 total_generic += st.Elapsed.TotalMilliseconds; |
38 | 38 |
39 // Stopwatch st = new Stopwatch (); | 39 st = new Stopwatch (); |
40 // st.Start (); | 40 st.Start (); |
41 // for (int i = 0; i < 10000; i++) { | 41 for (int i = 0; i < 10000; i++) { |
42 // GameObject obj = (GameObject) Resources.Load ("Prefabs/Box/Wood"); | 42 GameObject obj = (GameObject) Resources.Load ("Prefabs/Box/Wood"); |
43 // } | 43 } |
44 // st.Stop (); | 44 st.Stop (); |
45 // total_basic += st.Elapsed.TotalMilliseconds; | 45 total_basic += st.Elapsed.TotalMilliseconds; |
46 // | 46 |
47 // Stopwatch st = new Stopwatch (); | 47 st = new Stopwatch (); |
48 // st.Start (); | 48 st.Start (); |
49 // for (int i = 0; i < 10000; i++) { | 49 for (int i = 0; i < 10000; i++) { |
50 // GameObject obj = (GameObject) Resources.Load ("Prefabs/Box/Wood", typeof(GameObject)); | 50 GameObject obj = (GameObject) Resources.Load ("Prefabs/Box/Wood", typeof(GameObject)); |
51 // } | 51 } |
52 // st.Stop (); | 52 st.Stop (); |
53 // total_basic_typeof += st.Elapsed.TotalMilliseconds; | 53 total_basic_typeof += st.Elapsed.TotalMilliseconds; |
54 } | 54 } |
55 | 55 |
56 print ("as average : " + total_as / (double)times + "ms"); | 56 print ("as average : " + total_as / (double)times + "ms"); |
57 print ("generic average : " + total_generic / (double)times + "ms"); | 57 print ("generic average : " + total_generic / (double)times + "ms"); |
58 print ("basic average : " + total_basic / (double)times + "ms"); | 58 print ("basic average : " + total_basic / (double)times + "ms"); |