Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LINQ、Select連弾ってやります?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
RyotaMurohoshi
April 11, 2015
Technology
1
40
LINQ、Select連弾ってやります?
2015/04/11のJXUG第4回で発表した資料です
RyotaMurohoshi
April 11, 2015
Tweet
Share
More Decks by RyotaMurohoshi
See All by RyotaMurohoshi
Tilemapのアップデートについて
ryotamurohoshi
0
59
Unityの合同同人誌や合同商業誌を書いてる僕は感想やレビューや評価が欲しい
ryotamurohoshi
0
570
Unity 2021.1での Unityパッケージの名称変更について
ryotamurohoshi
0
770
Odin Validationはいいぞ!
ryotamurohoshi
2
1k
Tilemapはいいぞ!2020 〜すごいぞ、プロジェクト専用拡張Brush〜
ryotamurohoshi
0
2.4k
Unityでも、新しいC#
ryotamurohoshi
0
1.4k
Riderはいいぞ!
ryotamurohoshi
1
3.7k
Riderのススメ〜俺はRiderここが好き〜
ryotamurohoshi
1
2.6k
Unity開発者に伝えたい.NETのこと
ryotamurohoshi
4
38k
Other Decks in Technology
See All in Technology
Kusakabe_面白いダッシュボードの表現方法
ykka
0
380
re:Inventで見つけた「運用を捨てる」技術。
ezaki
1
130
Kiro Power - Amazon Bedrock AgentCore を学ぶ、もう一つの方法
r3_yamauchi
0
110
アウトプットはいいぞ / output_iizo
uhooi
0
140
SOC2は、取った瞬間よりその後が面白い
3flower
0
160
Agentic Coding 実践ワークショップ
watany
35
24k
ビジュアルプログラミングIoTLT vol.22
1ftseabass
PRO
0
110
AI時代にあわせたQA組織戦略
masamiyajiri
1
750
The Engineer with a Three-Year Cycle - 2
e99h2121
0
170
Security Hub と出会ってから 1年半が過ぎました
rch850
0
170
Proxmoxで作る自宅クラウド入門
koinunopochi
0
180
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
6
2.3k
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
74
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
120
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
220
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Done Done
chrislema
186
16k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
190
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Code Reviewing Like a Champion
maltzj
527
40k
A Tale of Four Properties
chriscoyier
162
24k
Transcript
LINQɺSelect࿈ͬͯΓ·͢ʁ ʲreferencesourceʳ ྄ࣨଠ 2015/04/11())ୈ4ճ)Japan)Xamarin)User)Group)Conference
͍͢·ͤΜ
Xamarin.iOSͱXamarin.Androidͷ
͠·ͤΜʂ
͓લͩΕΑʁ • ໊લ":"྄ࣨଠ • ࣄ":"UnityͰήʔϜ։ൃ • Twi+er":"@RyotaMurohoshi • ߘઌ":"h+p:/ /qiita.com/RyotaMurohoshi
UnityΫϥελ͔Βདྷ·ͨ͠ʂ
ʮUnityͩͱLINQ͕݁ߏམͪͯਏ͍Αʂʯ ͍ͬͯ͏LTΛҎલͨ͠ऀͰ͢ɻ JXUGͷษڧձͰɺ͜ΜͳΛ͍͍ͤͯͨͩͯ͋͞Γ͕ͱ͏͍͟͝·͢ɻ
ͱ͍͏͜ͱͰࠓ Xamarin.iOSXamarin.Android ͷ͠·ͤΜɻ
ͯ͞ɺLINQ࠷ߴͰ͢ΑͶ
લ͓͍͍ͤͯͨͩͨ͞௨Γ Unityͩͱ݁ߏLINQ͕མͪ·ͨ͠ ݪҼAOTίϯύΠϥؔ࿈ͷΤϥʔɻԿ͕ਏ͍ͬͯiOS͚ͩམͪΔ
ͭΒ͍
ͳͷͰ࡞Γ·ͨ͠ɻ ʮUniLinqʯͱ͍͏ɺUnityͰ͑Δ LINQޓϥΠϒϥϦ(β)
UniLinqmono/monoͷLINQͷίʔυ Λϕʔεʹ͍͔ͭ͘खΛՃ͑࡞Γ·ͨ͠ UnityͷUnity&Technologies/monoͷLINQͷίʔυͱൺ AOTίϯύΠϧؔ࿈Τϥʔରࡦ͕͔ͳΓ͞Ε͍ͯ·ͨ͠
ͯ͞ɺ͜͜·ͰલৼΓͰ͢
͋Δɺࣄ͕݅ى͖·ͨ͠
ʮ͋ΕɺmonoͷϦϙδτϦʹ LINQ%to%Objectsͷίʔυ͕ͳ͍ʯ h"ps:/ /github.com/mono/mono/blob/master/mcs/class/System.Core/System.Linq/Enumerable.cs
ͳɺΜͩͱɽɽɽɽ
ຊͷλΠτϧ
LINQɺSelect࿈ͬͯΓ·͢ʁ ʲreferencesourceʳ
referencesource
referencesource
referencesource
ͦ͏Ͱ͢ͶɻLINQͷίʔυɺ referencesourceʹஔ͖ΘͬͨΜͰ͢Ͷ issueίνϥ%h'ps:/ /github.com/mono/mono/pull/1477ɹ
referencesource h"ps:/ /github.com/Microso2/referencesource h"p:/ /www.mono+project.com/docs/about+mono/dotnet+integra8on/
referencesourceͷLINQͷίʔυɺ ͱͯݟ͍ͯͯ໘ന͍Ͱ͢ɻྫ͑ɺWhereͱSelectͷ࿈
ಡΈͣΒ͘ͳ͍Ͱ͔͢ʁ List<A> aList = LoadList (); IEnumerable<D> dList = aList
.Select (a => CovetCtoD( CovetBtoC( ConvertAtoB( a ) ) ) );
ͬͪ͜ͷํ͕͖Ͱ͢ɻ࿈ʂ List<A> aList = LoadList (); IEnumerable<D> dList = aList
.Select (a => CovetAtoB(a)) .Select (b => CovetBtoC(b)) .Select (c => CovetCtoD(c));
͜͏ॻ͚·͢Ͷɺ࿈ʂ List<A> aList = LoadList (); IEnumerable<D> dList = aList
.Select (CovetAtoB) .Select (CovetBtoC) .Select (CovetCtoD);
ΦʔόʔϔουؾʹͳΓ·͢ʁ referencesource൛Ͱରࡦ͞Ε͍ͯ·͢ʂ
Whereͱ͔SelectΛޮΑ͘ΔͨΊʹ EnumerableΫϥεʹ෦Ϋϥε܈͕ఆٛ͞Ε͍ͯΔ • WhereSelectEnumerableIterator • WhereSelectArrayIterator • WhereSelectListIterator ͳͲ
Έͳ͞ΜͳΒɺଟίʔυݟͨํ͕ૣ͍Ͱ͢ h"ps:/ /github.com/Microso2/referencesource/blob/master/System.Core/System/Linq/Enumerable.cs ɹ ͋ͱɺneue͞Μ͕ͱͬͯΘ͔Γ͘͢·ͱΊΒΕ͍ͯ·͢ h"p:/ /www.slideshare.net/neuecc/an3internal3of3linq3to3objects329200657
͓ଋ Xamarin͍͍ͳ͊ʙ Unityʹૣ͘དྷͳ͍͔ͳ͊ʙ
·ͱΊ • monoͷίʔυɺreferencesourceΛΨϯΨϯ׆༻͍ͯ͠·͢Ͷ • referencesourceͷLINQͷίʔυ໘ന͍Ͱ͢Α • WhereSelectͷ࿈ɺಡΈ͚͢Ε͍͍ͬͯͱࢥ͍·͢
ऄ Unityʹ৽ొͨ͠IL2CPPͰɺUniLinq͍Βͳ͍ࢠʁ