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
RyotaMurohoshi
April 11, 2015
Technology
1
39
LINQ、Select連弾ってやります?
2015/04/11のJXUG第4回で発表した資料です
RyotaMurohoshi
April 11, 2015
Tweet
Share
More Decks by RyotaMurohoshi
See All by RyotaMurohoshi
Tilemapのアップデートについて
ryotamurohoshi
0
29
Unityの合同同人誌や合同商業誌を書いてる僕は感想やレビューや評価が欲しい
ryotamurohoshi
0
540
Unity 2021.1での Unityパッケージの名称変更について
ryotamurohoshi
0
720
Odin Validationはいいぞ!
ryotamurohoshi
2
970
Tilemapはいいぞ!2020 〜すごいぞ、プロジェクト専用拡張Brush〜
ryotamurohoshi
0
2.4k
Unityでも、新しいC#
ryotamurohoshi
0
1.3k
Riderはいいぞ!
ryotamurohoshi
1
3.5k
Riderのススメ〜俺はRiderここが好き〜
ryotamurohoshi
1
2.4k
Unity開発者に伝えたい.NETのこと
ryotamurohoshi
4
37k
Other Decks in Technology
See All in Technology
From Live Coding to Vibe Coding with Firebase Studio
firebasethailand
1
400
恐怖!テストコードなき夜
tsukuboshi
2
110
ファインディにおける Dataform ブランチ戦略
hiracky16
0
250
2025-07-31: GitHub Copilot Agent mode at Vibe Coding Cafe (15min)
chomado
2
310
風が吹けばWHOISが使えなくなる~なぜWHOIS・RDAPはサーバー証明書のメール認証に使えなくなったのか~
orangemorishita
15
5k
金融サービスにおける高速な価値提供とAIの役割 #BetAIDay
layerx
PRO
1
560
株式会社島津製作所_研究開発(集団協業と知的生産)の現場を支える、OSS知識基盤システムの導入
akahane92
1
1.3k
【CEDEC2025】ブランド力アップのためのコンテンツマーケティング~ゲーム会社における情報資産の活かし方~
cygames
PRO
0
200
ecspressoの設計思想に至る道 / sekkeinight2025
fujiwara3
12
2.3k
LLM開発を支えるエヌビディアの生成AIエコシステム
acceleratedmu3n
0
360
Power Automate のパフォーマンス改善レシピ / Power Automate Performance Improvement Recipes
karamem0
0
280
経験がないことを言い訳にしない、 AI時代の他領域への染み出し方
parayama0625
0
290
Featured
See All Featured
Six Lessons from altMBA
skipperchong
28
3.9k
Optimizing for Happiness
mojombo
379
70k
Gamification - CAS2011
davidbonilla
81
5.4k
GitHub's CSS Performance
jonrohan
1031
460k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Designing for Performance
lara
610
69k
We Have a Design System, Now What?
morganepeng
53
7.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
332
22k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
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͍Βͳ͍ࢠʁ