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
Unityの合同同人誌や合同商業誌を書いてる僕は感想やレビューや評価が欲しい
ryotamurohoshi
0
520
Unity 2021.1での Unityパッケージの名称変更について
ryotamurohoshi
0
700
Odin Validationはいいぞ!
ryotamurohoshi
2
950
Tilemapはいいぞ!2020 〜すごいぞ、プロジェクト専用拡張Brush〜
ryotamurohoshi
0
2.4k
Unityでも、新しいC#
ryotamurohoshi
0
1.3k
Riderはいいぞ!
ryotamurohoshi
1
3.4k
Riderのススメ〜俺はRiderここが好き〜
ryotamurohoshi
1
2.4k
Unity開発者に伝えたい.NETのこと
ryotamurohoshi
4
37k
ImportedLinqのススメ
ryotamurohoshi
0
1.4k
Other Decks in Technology
See All in Technology
AIエージェントデザインパターンの選び方
almondo_event
0
120
Slackひと声でブログ校正!Claudeレビュー自動化編
yusukeshimizu
3
140
Roo Codeにすべてを委ねるためのルール運用
pharma_x_tech
1
130
令和トラベルQAのAI活用
seigaitakahiro
0
470
スプリントゴールで価値を駆動しよう
takufujii
3
1.6k
Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
0
430
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
8
65k
カンファレンスのつくりかた / The Conference Code: What Makes It All Work
tomzoh
7
870
AIコードエディタは開発を変えるか?Cursorをチームに導入して1ヶ月経った本音
ota1022
1
630
他チームへ越境したら、生データ提供ソリューションのクエリ費用95%削減へ繋がった話 / Cross-Team Impact: 95% Off Raw Data Query Costs
yamamotoyuta
0
170
プラットフォームとしての Datadog / Datadog as Platforms
aoto
PRO
1
320
GitHub Coding Agent 概要
kkamegawa
1
1.2k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
The Language of Interfaces
destraynor
158
25k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
Scaling GitHub
holman
459
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Writing Fast Ruby
sferik
628
61k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Being A Developer After 40
akosma
91
590k
For a Future-Friendly Web
brad_frost
178
9.7k
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͍Βͳ͍ࢠʁ