Slide 1

Slide 1 text

Data Structures @ariarijp (Takuya Arita / ༗ా ୓࠸)

Slide 2

Slide 2 text

Data Structures?

Slide 3

Slide 3 text

Data Structures ʹ͍ͭͯ • PHP ϚχϡΞϧ • http://php.net/manual/ja/book.ds.php • GItHub • https://github.com/php-ds/ext-ds • ։ൃऀʹΑΔղઆ • https://medium.com/@rtheunissen/efficient-data-structures- for-php-7-9dda7af674cd

Slide 4

Slide 4 text

։ൃऀʹΑΔղઆهࣄͷൈਮ PHP has one data structure to rule them all. The array is a complex, flexible, master-of-none, hybrid data structure, combining the behaviour of a list and a linked map. But we use it for everything, because PHP is pragmatic: “dealing with things sensibly and realistically in a way that is based on practical rather than theoretical considerations”. An array gets the job done. Unfortunately, with flexibility comes complexity.

Slide 5

Slide 5 text

ಛ௃ • Α͋͘Δσʔλߏ଄Λఏڙ • ༻్ʹ͋Θͤͯద੾ʹσʔλߏ଄Λબ୒Ͱ͖ Ε͹ɺύϑΥʔϚϯε޲্Λૂ͑Δ • Polyfill ΋ఏڙ͞Ε͍ͯΔ

Slide 6

Slide 6 text

αϙʔτ͍ͯ͠Δσʔλߏ଄ • Vector • Deque • Map • Set • Stack • Queue • PriorityQueue • Pair

Slide 7

Slide 7 text

·ͱΊ • ແཧʹ࢖͏͜ͱ΋ແ͍Ͱ͕͢ɺ஌͓ͬͯ͘ͱ ॿ͔Δ͜ͱ͕͋Δ͔΋͠Ε·ͤΜ • ͔͠͠ɺ͜Εͬͯ PHP ʮΒ͍͠ʯͷ͔ʁ • ·ͩ·ͩ PHP ʹ΋஌Βͳ͍͜ͱ͕͍ͬͺ͍͋ Γ·͢Ͷʂ

Slide 8

Slide 8 text

খωλͰ͕ͨ͠ ʮ஌ͬͯΔʯͷ͓ͦ͢Θ͚Ͱͨ͠