Slide 1

Slide 1 text

PTZPZVc:"1$)BLPEBUF ϓϩϑΝΠϥ։ൃऀͱݟΔ ʮਪଌ͢ΔͳɺܭଌͤΑʯ

Slide 2

Slide 2 text

5IFNPTUBNB[JOHBDIJFWFNFOUPGUIFDPNQVUFSTPGUXBSF JOEVTUSZJTJUTDPOUJOVJOHDBODFMMBUJPOPGUIFTUFBEZBOE TUBHHFSJOHHBJOTNBEFCZUIFDPNQVUFSIBSEXBSFJOEVTUSZ ιϑτ΢ΣΞ࢈ۀͷ΋ͬͱ΋Ғେͳޭ੷͸ɺ ϋʔυ΢ΣΞ࢈ۀ͕੒͠਱͛Δண࣮͔ͭڻҟతͳਐาΛ ଧͪফ͠ଓ͚Δ͜ͱͰ͋Δɻ )FOSZ1FUSPTLJ

Slide 3

Slide 3 text

&/*"$ ඍ෼ํఔࣜʹ਺஋ղΛ༩͑Δ $MBVEF4POOFU

Slide 4

Slide 4 text

5IFNPTUBNB[JOHBDIJFWFNFOUPGUIFDPNQVUFSTPGUXBSF JOEVTUSZJTJUTDPOUJOVJOHDBODFMMBUJPOPGUIFTUFBEZBOE TUBHHFSJOHHBJOTNBEFCZUIFDPNQVUFSIBSEXBSFJOEVTUSZ ιϑτ΢ΣΞ࢈ۀͷ΋ͬͱ΋Ғେͳޭ੷͸ɺ ϋʔυ΢ΣΞ࢈ۀ͕੒͠਱͛Δண࣮͔ͭڻҟతͳਐาΛ ଧͪফ͠ଓ͚Δ͜ͱͰ͋Δɻ )FOSZ1FUSPTLJ

Slide 5

Slide 5 text

5IFNPTUBNB[JOHBDIJFWFNFOUPGUIFDPNQVUFSTPGUXBSF JOEVTUSZJTJUTDPOUJOVJOHDBODFMMBUJPOPGUIFTUFBEZBOE TUBHHFSJOHHBJOTNBEFCZUIFDPNQVUFSIBSEXBSFJOEVTUSZ ιϑτ΢ΣΞ࢈ۀͷ΋ͬͱ΋Ғେͳޭ੷͸ɺ ϋʔυ΢ΣΞ࢈ۀ͕੒͠਱͛Δண࣮͔ͭڻҟతͳਐาΛ ଧͪফ͠ଓ͚Δ͜ͱͰ͋Δɻ )FOSZ1FUSPTLJ ύϑΥʔϚϯεΤϯδχΞϦϯά

Slide 6

Slide 6 text

༗༑େี PTZPZV גࣜձࣾεϚʔτόϯΫۈ຿ 3VCZ͕޷͖ ౦ژ3VCZձٞ ࣮ߦҕһ௕!ԣ඿

Slide 7

Slide 7 text

Ѫಡॻ w #SFOEBO(SFHHઌੜͷTZTQFSGຊ w ϖʔδ w ࠓ͙͢ߪೖʂ

Slide 8

Slide 8 text

X

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

ίϛϡχςΟϊʔτΛ͚ͭͯ΋Β͑Δ ஆ͔͍ձࣾͰ͢

Slide 11

Slide 11 text

ຊ೔ͷΩʔϫʔυ ʮϓϩϑΝΠϥʯʮܭଌʯ

Slide 12

Slide 12 text

ϓϩϑΝΠϥͱ͸ w ϓϩάϥϜͷ஗͍෦෼Λಛఆ͢ΔͨΊͷπʔϧ % perl -d:Profile program.pl time elapsed (wall): 86.8212 time running program: 65.7657 (75.75%) time profiling (est.): 21.0556 (24.25%) number of calls: 647248 %Time Sec. #calls sec/call F name 31.74 20.8770 2306 0.009053 Configable::init_from_config 20.09 13.2116 144638 0.000091 Configable::init_field_from_config 17.49 11.5043 297997 0.000039 Configable::has_attr 8.22 5.4028 312 0.017317 MonEl::recycle 7.54 4.9570 64239 0.000077 Configable::inherit 5.02 3.3042 101289 0.000033 MonEl::unique [...] $PO fi HBCMFJOJU@GSPN@DPO fi HͰ ࣮ߦ࣌ؒͷΛ࢖ͬͨ ʢ͕͜͜ϘτϧωοΫ͔΋͠Εͳ͍ʣ

Slide 13

Slide 13 text

ϓϩϑΝΠϥ͍Ζ͍Ζ w %FWFM1SP fi MF %FWFM/:51SPG 1FSM w QZTQZ 1ZUIPO w QQSPG (P w BTZODQSP fi MFS +BWB w $ISPNF%FW5PPMT +BWB4DSJQU w *OTUSVNFOUT 9DPEF w QFSG -JOVY

Slide 14

Slide 14 text

झຯͰ3VCZϓϩϑΝΠϥΛ࡞͍ͬͯ·͢ HJUIVCDPNPTZPZVQG w 3VCZͷ۱ʑ·Ͱਖ਼֬ʹ ଌఆͰ͖Δ͜ͱΛΊ͟͢ϓϩϑ ΝΠϥ w 3VCZϑϨʔϜ w $Ϩϕϧͷؔ਺ w ࠓ೔͸͜ͷ࿩͸ͦΜͳʹ͋Γ· ͤΜ w 3VCZ,BJHJͷൃදΛݟͯ

Slide 15

Slide 15 text

ϏδϡΞϥΠζɺͰ͖·͢ εϨου͝ͱͷ༷ࢠͷ τϥοΫ ίʔϧπϦʔ Flamegraph

Slide 16

Slide 16 text

Ͱ͖Ε͹͜͜ͰσϞΛ͍ͨ͠

Slide 17

Slide 17 text

ϓϩϑΝΠϥ΋ສೳͰ͸ͳ͍ 'MBNFHSBQI͚ͩݟΕ͹͍͍ͬͯ΋Μ͡Όͳ͍ w ສೳʹࢥ͑Δ'MBNFHSBQI͕ͩɺ ݟམͱ͢͜ͱ΋݁ߏ͋Δ w GFUDI@VTFS ʹ໰୊͕͋Γͦ͏͕ͩ ෼͔Γ΍͘͢ग़Δͱ͸ݶΒͳ͍ def a u = fetch_user() u.foo() end def b u = fetch_user() u.bar() end def c u = fetch_user() u.baz() end

Slide 18

Slide 18 text

ʮܭଌʯ

Slide 19

Slide 19 text

ਓ͸ͳͥύϑΥʔϚϯεܭଌ͢Δͷ͔ w ؾ͕޲͍ͨͱ͖ʁ w ࣗࣾͷ8FCαʔϏεͷಛఆͷΤϯυϙΠϯτ͕ ஗͍͜ͱʹؾ͍ͮͨͱ͖ʁ w ·ͬͨ͘஌Βͳ͍ίʔυϕʔεΛ౉͞Εɺ࣌ؒҎ಺ͷվળΛ໋͡ΒΕɺ ສԁΛ͔͚ͯ૪͏ͱ͖ʁʢ݄ʣ ͍Ζ͍Ζ͋ͬͯɺਓͦΕͧΕ

Slide 20

Slide 20 text

ʮਪଌ͢ΔͳɺܭଌͤΑʯ

Slide 21

Slide 21 text

ʮਪଌ͢ΔͳɺܭଌͤΑʯ w ౰ͯͣͬΆ͏ͰͷύϑΥʔϚϯεվળΛռΊΔݴ༿ w ʮͳΜ͔஗͍͚Ͳɺଟ෼%#ͷΠϯσοΫε͕ෆ଍ͯ͠ΔΜͰ͠ΐʯ w ʮ͜ͷลΛΩϟογϡ͢Ε͹଎͘ͳΔΑʯ w ͜͏͍͏ͷ͸Α͘ͳ͍ΑͶ w ͔ͩΒϓϩϑΝΠϥΛ࢖͓͏Ͷɺͱ͍͏จ຺ͰΑ͘ొ৔͢Δ

Slide 22

Slide 22 text

Ͱ͸ʮܭଌʯ͢Ε͹͍͍ͷ͔ʁ w ౴͑͸൱ w ͳΜͱͳ͘ϓϩϑΝΠϥΛೖΕͯɺͳΜͱͳ͘ fl BNFHSBQIΛݟͯ ͳΜͱͳ͘ॲཧ͕࣌ؒ௕ͦ͏ͳͱ͜ΖΛ࡟ͬͯΈΔͷ͸ ʮ౰ͯͣͬΆ͏ͳվળʯʹଞͳΒͳ͍ w ֏Λ͍ͯ͠Δਓ͕དྷͨͱ͖ʹɺN૸ͷλΠϜΛଌͬͯ΋͋·Γҙຯ͕ͳ͍ ౰ͯͣͬΆ͏ͷվળ͸ແҙຯ͕ͩɺ ౰ͯͣͬΆ͏ͷܭଌʹ΋ҙຯ͕ͳ͍

Slide 23

Slide 23 text

໰୊ൃੜ ղܾ ਪଌ ରԠ ʘ΄Μͱʹ߹ͬͯΔ ʗ ʮਪଌ͢Δʯ

Slide 24

Slide 24 text

໰୊ൃੜ ղܾ ܭଌ ରԠ ʘ͜Ε͕ݪҼͩʂʗ ຊ౰ʁ ʮਪଌ͠ͳ͍Ͱɺܭଌ͢Δʯ w ʮܭଌʯΛ͢Δ͚ͩͰɺ໰୊ͷਅҼ͕ಘΒΕΔͱ͸·ͬͨ͘ݶΒͳ͍ w ਅҼʹͨͲΓ͍͍ͭͯͳ͍ঢ়ଶͷʮରԠʯ͸Ձ஋͕௿͍ w ढज़ࣜύϑΥʔϚϯενϡʔχϯάͱݴ͑Α͏

Slide 25

Slide 25 text

໰୊ൃੜ ղܾ ܭଌ ରԠ ݕূՄೳͳ Ծઆ ཧ૝ɿܭଌΛ࢖ͬͯԾઆݕূ ݕূ ໰୊͸վળ͔ͨ͠ʁ ࣮͸ผͷܭଌ͕ඞཁͰ͸ͳ͔͔ͬͨʁ

Slide 26

Slide 26 text

ʮܭଌʯͷ࢖͍Ͳ͜Ζ w ໰୊͕͋ͬͨͱ͖ɺॳظͷঢ়گ೺ѲͷͨΊ w ύϑΥʔϚϯενϡʔχϯάͷԾઆݕূαΠΫϧͷதͰɺ ͱͬͨରԠͷޮՌΛݕূ͢ΔͨΊ w *46$0/༏উؒҧ͍ͳ͠ʂୈ෦׬οʂ

Slide 27

Slide 27 text

ҙ֎ʹ΋͔ͬ͠Γ೉͍͠ ʮܭଌʯ

Slide 28

Slide 28 text

ܭଌ ԿΛܭଌ͢Δ͔ ͲͷΑ͏ʹܭଌ͢Δ͔ ݁ՌΛͲ͏ධՁ͢Δ͔

Slide 29

Slide 29 text

ʮαʔϏε͕஗͘ͳͬͯΔʂʯ w ݕࡧ݁Ռϖʔδ͕։͔ͳ͍ w ͓٬༷ʹόϦόϦౖΒΕͯΔ w ͋Δ͍͸ɺ࣌ؒҎ಺ʹमਖ਼͠ͳ͍ͱ͍͚ͳ͍͔΋஌Εͳ͍ w ͦͷ࣌ɺԿΛ͢Δʁ

Slide 30

Slide 30 text

ԿΛܭଌ͢Δ͔ ࣌ؒ ࣮࣌ؒ XBMMUJNF $16࣌ؒ *0଴ͪͷ࣌ؒ $16ͷαΠΫϧ਺ $166UJMJ[BUJPO Ωϟογϡώοτ཰ γεςϜίʔϧ਺ ϝϞϦ࢖༻ྔ 744 NBMMPD 344 ෺ཧϝϞϦ 144 ϝϞϦϑϥάϝϯςʔ γϣϯ ϓϩηε਺ εϨουͷ਺ -PBE"WFSBHF ϦΫΤετճ਺ ϨεϙϯελΠϜ CBDLMPH௕ )551ϔομʔͷ ύʔε࣌ؒ %#.4 42- ݁Ռͷߦ਺ εΩϟϯߦ਺ +0*/ͷίετ ϩοΫ֫ಘ଴ͪ࣌ؒ ؔ਺ͷݺͼग़͠ճ ਺ 7.໋ྩ਺ ($ͷ࣌ؒ +*5ͷώοτ཰ ϝιουσΟεύο ν

Slide 31

Slide 31 text

ԿΛܭଌ͢Δ͔ ࣌ؒ ࣮࣌ؒ XBMMUJNF $16࣌ؒ *0଴ͪͷ࣌ؒ $16ͷαΠΫϧ਺ $166UJMJ[BUJPO Ωϟογϡώοτ཰ γεςϜίʔϧ਺ ϝϞϦ࢖༻ྔ 744 NBMMPD 344 ෺ཧϝϞϦ 144 ϝϞϦϑϥάϝϯςʔ γϣϯ ϓϩηε਺ εϨουͷ਺ -PBE"WFSBHF ϦΫΤετճ਺ ϨεϙϯελΠϜ CBDLMPH௕ )551ϔομʔͷ ύʔε࣌ؒ %#.4 42- ݁Ռͷߦ਺ εΩϟϯߦ਺ +0*/ͷίετ ϩοΫ֫ಘ଴ͪ࣌ؒ ؔ਺ͷݺͼग़͠ճ ਺ 7.໋ྩ਺ ($ͷ࣌ؒ +*5ͷώοτ཰ ϝιουσΟεύο ν Ͳ͔͜Βணख͢Ε͹ʁ

Slide 32

Slide 32 text

Ռ αʔϏε͕஗͍ %#αʔόʔͷ $16͕ Ҽ ʁʁʁ ΫΤϦ͕ͨ͘͞ΜඈͿ /͕͋Δ εΩϟϯྔ͕૿͑Δ ϨεϙϯελΠϜ͕ ৳ͼΔ CBDLMPH͕ ৳ͼΔ ϝτϦΫε͕ ͓͔͘͠ͳΔ

Slide 33

Slide 33 text

Ռ αʔϏε͕஗͍ Ҽ ʁʁʁ ผͷྫ

Slide 34

Slide 34 text

Ռ αʔϏε͕஗͍ %#αʔόʔͷ $16͕ ʜʜܭଌՄೳͳ͜ͱ DQV Ҽ ʁʁʁ

Slide 35

Slide 35 text

Ռ αʔϏε͕஗͍ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ ʜʜܭଌՄೳͳ͜ͱ DQV Ҽ ʁʁʁ

Slide 36

Slide 36 text

Ռ αʔϏε͕஗͍ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜܭଌՄೳͳ͜ͱ $16TZTUFN QFSG DQV Ҽ ʁʁʁ

Slide 37

Slide 37 text

Ռ αʔϏε͕஗͍ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ EFBEUVQMF͕ ര૿͢Δ ϝϞϦͷ ࢖༻ྔ΋૿͑Δ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜܭଌՄೳͳ͜ͱ $16TZTUFN QFSG QH@TUBU DQV Ҽ ʁʁʁ

Slide 38

Slide 38 text

Ռ αʔϏε͕஗͍ Ҽ VQEBUF͕ ଟ͗͢Δઃܭ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ EFBEUVQMF͕ ര૿͢Δ ϝϞϦͷ ࢖༻ྔ΋૿͑Δ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜܭଌՄೳͳ͜ͱ $16TZTUFN QFSG QH@TUBU DQV

Slide 39

Slide 39 text

Ռ αʔϏε͕஗͍ Ҽ VQEBUF͕ ଟ͗͢Δઃܭ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ ϩάྔ͕ര૿ͯ͠ ετϨʔδѹഭ EFBEUVQMF͕ ര૿͢Δ ϝϞϦͷ ࢖༻ྔ΋૿͑Δ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜ ʜʜܭଌՄೳͳ͜ͱ $16TZTUFN QFSG QH@TUBU DQV ʜʜ ʜʜ

Slide 40

Slide 40 text

ܭଌ͢΂͖͸ɺঢ়گͷதͰมԽͯ͠Ώ͘ w ໰୊Λೝࣝͨ͠ॳظͷஈ֊Ͱ͸ɺγϣοτΨϯతʜʜ ͨ͘͞ΜͷࢦඪΛ֬ೝͯ͠ཧղΛܗ੒͢Δͷ͕༗ҙٛ w ԾઆݕূͷதͰɺ࣍ʹܭଌ͢΂͖ର৅͸ࣗͣͱܾ·ͬͯΏ͘ w ʢʜʜ͔ͱࢥ͍͖΍ɺͦ͏ͱ΋ݶΒͳ͍ʂʣ

Slide 41

Slide 41 text

ଘࡏ͢Β஌Βͳ͍͜ͱ͸ௐ΂ΒΕͳ͍ w ্ͷίʔυ͸Լͷίʔυͷഒ஗͍ w x[i][j]Λx[j][i]ʹ͢Δͱɺ ಺ଆͷ഑ྻ͕$16Ωϟογϡʹ ৐Βͳ͘ͳΔ w ͜Ε͸ʮܭଌʯͰൃݟՄೳͰ͸͋Δ ͕ɺ໨ʹೖͬͯ΋$16Ωϟογϡͷ ͜ͱΛ஌ΒͶ͹վળ͸Ͱ͖ͳ͍ int x[10000][10000]; for (i = 0; i < 10000; i++) { for (j = 0; j < 10000; j++) { puts(x[i][j]); } } for (i = 0; i < 10000; i++) { for (j = 0; j < 10000; j++) { puts(x[j][i]); } }

Slide 42

Slide 42 text

Ռ αʔϏε͕஗͍ Ҽ VQEBUF͕ ଟ͗͢Δઃܭ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ ϩάྔ͕ര૿ͯ͠ ετϨʔδѹഭ EFBEUVQMF͕ ര૿͢Δ ϝϞϦͷ ࢖༻ྔ΋૿͑Δ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜ $16TZTUFN QFSG QH@TUBU DQV ʜʜ ʜʜ

Slide 43

Slide 43 text

Ռ αʔϏε͕஗͍ Ҽ VQEBUF͕ ଟ͗͢Δઃܭ %#αʔόʔͷ $16͕ &91-"*/ ໰୊͸ͳ͔ͬͨʜʜ ϩάྔ͕ര૿ͯ͠ ετϨʔδѹഭ EFBEUVQMF͕ ര૿͢Δ ϝϞϦͷ ࢖༻ྔ΋૿͑Δ 5-#͕͋;Ε ϖʔδϑΥϧτ Χʔωϧ͕$16Λ ࢖ͬͯϖʔδΛ୳͢ ʜʜ $16TZTUFN QFSG QH@TUBU DQV ʜʜ ʜʜ ޿ൣͳ஌͕ࣝͳ͍ͱ ݪҼʹͨͲΓண͚ͳ͍ྫ

Slide 44

Slide 44 text

,OPXO,OPXOT ҙࣝ͠ɺཧղ͍ͯ͠Δ͜ͱ ܭଌ͢Δ͜ͱ͕Ͱ͖ɺ࣮ࡍͷ஋΋෼͔Δ 6OLOPXO,OPXOT ҙ͍ࣝͯ͠Δ͕ɺཧղ͍ͯ͠ͳ͍͜ͱ ܭଌͰ͖Δ͜ͱ͸஌͍ͬͯΔ͕ɺ ·͍ͩͯ͠ͳ͍ 6OLOPXO6OLOPXOT ҙࣝ΋ཧղ΋͍ͯ͠ͳ͍͜ͱ ܭଌ͠Α͏ͱ΋ࢥΘͳ͍ ύϑΥʔϚϯεΤϯδχΞϦϯά͸ 6OLOPXO,OPXOT΍ 6OLOPXO6OLOPXOTΛ ,OPXO,OPXOTʹ స׵ͯ͠Ώ͘ߦ͍

Slide 45

Slide 45 text

౴͑͸͍ͭ΋༧૝֎ͷͱ͜Ζʹ͋Δ ༧૝Ͱ͖Δ͜ͱ͸༧૝͓ͯ͜͠͏ w 3PC1JLFઌੜ΋ͦ͏ड़΂͍ͯΔ 3VMFTPG1SPHSBNNJOH w ϓϩάϥϜ͕Ͳ͜Ͱ࣌ؒΛফඅ͍ͯ͠Δ͔Λ౰ͯΔ͜ͱ͸ ೉͍͠ɻϘτϧωοΫ͸༧૝֎ͷͱ͜Ζʹ͋ΔͷͰɺ஗͍৔ॴΛಛఆͤͣ ʹTQFFEIBDLΛೖΕΔ͜ͱ͸͢Δͳɻ w ܭଌ஋ͷҧ࿨ײʹؾ͖ͮ΍͘͢͢ΔͨΊʹ΋ɺ ࣗ෼ͷίʔυϕʔε͸۱ʑ·Ͱ೺Ѳ͍͍ͯͨ͠ w ԿΛ͍ͯ͠Δͷ͔ʁԿͷͨΊʹ͍ͯ͠Δͷ͔ʁͲͷΑ͏ʹ͍ͯ͠Δͷ͔ʁ

Slide 46

Slide 46 text

ܭଌ ԿΛܭଌ͢Δ͔ ͲͷΑ͏ʹܭଌ͢Δ͔ ݁ՌΛͲ͏ධՁ͢Δ͔ ʘઆڭ͘͘͞ͳ͍ύʔτʗ

Slide 47

Slide 47 text

ʮܭଌʯ͍Ζ͍Ζ ؆ศ μϧ͍ ͔ͬ͠Γ ͬ͘͟Γ ϓϩϑΝΠϥ ΞΫηεϩά "1. /FX3FMJD %BUBEPH GSFF TBS IUPQ εϩʔΫΤϦϩά ֤छ$MPVE.FUSJDT &91-"*/ QSJOUG σόοά TUSBDF

Slide 48

Slide 48 text

Ͳ͏΍ͬͯଌΔ ͜Ε͕໘ന͍ w ͦΕΒ͍͠ઃఆɾπʔϧΛೖΕͯΈΔʁ w 42-ͷ໰୊ͳΒɺ&91-"*/ͯ͠ΈΔʁ w ΞϓϦ͕ٙΘ͍͠ͳΒɺϓϩϑΝΠϥΛೖΕͯΈΔʁ w ͜ΕΒ͸Ͳ͏࣮૷͞Ε͍ͯΔʁ

Slide 49

Slide 49 text

࠶ܝԿΛܭଌ͢Δ͔ ࣌ؒ ࣮࣌ؒ XBMMUJNF $16࣌ؒ *0଴ͪͷ࣌ؒ $16ͷαΠΫϧ਺ $166UJMJ[BUJPO Ωϟογϡώοτ཰ γεςϜίʔϧ਺ ϝϞϦ࢖༻ྔ 744 NBMMPD 344 ෺ཧϝϞϦ 144 ϝϞϦϑϥάϝϯςʔ γϣϯ ϓϩηε਺ εϨουͷ਺ -PBE"WFSBHF ϦΫΤετճ਺ ϨεϙϯελΠϜ CBDLMPH௕ )551ϔομʔͷ ύʔε࣌ؒ %#.4 42- ݁Ռͷߦ਺ εΩϟϯߦ਺ +0*/ͷίετ ϩοΫ֫ಘ଴ͪ࣌ؒ ؔ਺ͷݺͼग़͠ճ ਺ 7.໋ྩ਺ ($ͷ࣌ؒ +*5ͷώοτ཰ ϝιουσΟεύο ν

Slide 50

Slide 50 text

࣌ؒͷܭଌ def foo start = Time.now query("select *") end = Time.now elapsed = end - start puts "query consumed #{elapsed}s" end

Slide 51

Slide 51 text

࣌ؒͷܭଌ def foo start = Time.now query("select *") end = Time.now elapsed = end - start puts "query consumed #{elapsed}s" end w ճͷ࣮ߦͰ͍͍ͷʁ w ͨ·ͨ·֎෦ͷӨڹ͕େ͖͍͔΋ ͠Εͳ͍ w 5JNFOPX͸ϞϊτχοΫ͡Όͳ͍ w RVFSZதʹݱࡏ࣌ࠁ͕มߋ͞Ε ͨΒόάΔ w ($΍(7-֫ಘ଴ͪ΋RVFSZʹܭ ্͞Εͯ͠·͏ w ԿΑΓɺ͋ΒΏΔ৔ॴʹ͜ΕΛ ࢓ࠐΉͷ͸ݱ࣮త͡Όͳ͍

Slide 52

Slide 52 text

ͦ΋ͦ΋ʮ࣌ؒʯʹ΋͍Ζ͍Ζ͋Δ w ࣮࣌ؒ $-0$,@3&"-5*.& w զʑ͕ೝ͍ࣝͯ͠Δʮ࣌ؒʯ w ୯ௐ૿Ճͳ࣮࣌ؒ $-0$,@.0/050/*$ w γεςϜ͕ىಈ͔ͯ͠Βͷ࣌ؒʜʜͳͲ w ר͖໭Βͳ͍ w $16࣌ؒ $-0$,@130$&44@$165*.&@*% w $16͕ܭࢉΛߦ͍ͬͯͨ࣌ؒ w *0 σΟεΫ΍ωοτϫʔΫ ͷ࣌ؒ͸আ͘ def foo query("select *") end

Slide 53

Slide 53 text

࣌ؒΛଌΔͷ͸೉͍͠ w ϢʔβʔϥϯυͰ͸ଌΕͳ͍छྨͷ࣌ؒ΋͋ Δ w ʮ$16࣌ؒʯ͸ΧʔωϧͷΈ͕஌ΓಘΔ w ϢʔβʔϥϯυͰ͸VTFSͱJPXBJUΛ۠ผ Ͱ͖ͳ͍ w εϨου QUISFBE ͝ͱʹͳΔͱঘߋ w "஍఺͔Β#஍఺ͷ࣌ؒ͸ܭΕͯ΋ɺ ʮNTඵ͝ͱʹλΠϚʔΛಈ͔͢ʯ͸࣮ݱ Ͱ͖ͳ͍ w ׂΓࠐΈͰ͖ͳ͍ͱ͍͚ͳ͍ struct sigevent sigevent = { .sigev_notify = SIGEV_THREAD_ID; .sigev_signo = SIGPROF; }; struct itimerspec timer = { .it_interval = { .tv_sec = 0; .tv_nsec = 1000000; // 10 ms }; ... }; timer_create(CLOCK_MONOTONIC, &sigevent, &timer)

Slide 54

Slide 54 text

ϓϩϑΝΠϥͷ࢓૊Έ ؆ུ൛ w ϓϩϑΝΠϥͷ࢓ࣄ͸ʮҰఆ࣌ؒ͝ͱʹʯʮϓϩάϥϜ͕ԿΛ΍ͬͯΔ͔ʯ ऩू͢Δ͜ͱ

Slide 55

Slide 55 text

ਤղɿγάφϧϋϯυϥΛ࢖ͬͨεέδϡʔϦϯά 0ms 10ms 20ms 30ms Thread 1 Thread 2 ΧʔωϧλΠϚʔʹΑΔׂΓࠐΈ Using CPU Using CPU Using CPU γάφϧϋϯυϥ ࣮ߦதͷελοΫΛݴޠ VM or Χʔωϧ ʹΫΤϦ ετϨʔδʹऔಘɾه࿥ γάφϧϋϯυϥ ΧʔωϧׂΓࠐΈ

Slide 56

Slide 56 text

࣌ؒͰ͸ͳ͘ɺϝϞϦͳΒͲ͏͔ʁ w ϓϩηεશମͰͲͷΑ͏ʹϝϞϦΛ࢖͍ͬͯΔ͔ ܭଌ͢Δʹ͸Ͳ͏͢Δ͔ʁ w FH͜ͷछྨͷΦϒδΣΫτ͕ଟ͍Α͏ͩ w 3VCZͷΑ͏ʹɺ7.ܕͷݴޠͳΒ͹7.Ͱه࿥Ͱ͖Δ w ͦ͏Ͱͳ͚Ε͹ɺΞϩέʔλ NBMMPD ʹ࢓ࠐΈ͕ඞཁʹͳΔ w ʮܭଌʯ͢ΔͨΊʹ͸ɺԼͷϨΠϠ΁ͷ࢓ࠐΈ͕ඞཁ

Slide 57

Slide 57 text

ϝϞϦϨΠςϯγ͸ʁ w ϝϞϦʹΞΫηεͨ͠ͱ͖ͷϨΠςϯγ w ͜Ε͸ΞϓϦέʔγϣϯϨΠϠͰ͸ຊ౰ʹऔΓΑ͏͕ͳ͍ w $16͸͜͏͍͏͜ͱ΋ܭଌͰ͖ΔΑ͏ύϑΥʔϚϯεΧ΢ϯλΛඋ͍͑ͯΔ

Slide 58

Slide 58 text

$16ͷύϑΥʔϚϯεΧ΢ϯλ 1.$ % perf list branch-instructions OR branches [Hardware event] branch-misses [Hardware event] bus-cycles [Hardware event] cache-misses [Hardware event] cache-references [Hardware event] cpu-cycles OR cycles [Hardware event] instructions [Hardware event] ref-cycles [Hardware event] alignment-faults [Software event] bpf-output [Software event] cgroup-switches [Software event] context-switches OR cs [Software event] cpu-clock [Software event] cpu-migrations OR migrations [Software event] dummy [Software event] emulation-faults [Software event] major-faults [Software event]

Slide 59

Slide 59 text

Χʔωϧ͔Β΋औΕΔ৘ใ͍Ζ͍Ζ % ls /proc/sys/kernel acct hung_task_warnings ostype random softlockup_panic acpi_video_flags io_delay_type overflowgid randomize_va_space soft_watchdog arch io_uring_disabled overflowuid real-root-dev split_lock_mitigate auto_msgmni io_uring_group panic sched_autogroup_enabled stack_tracer_enabled bootloader_type kexec_load_disabled panic_on_io_nmi sched_cfs_bandwidth_slice_us sysctl_writes_strict bootloader_version kexec_load_limit_panic panic_on_oops sched_deadline_period_max_us sysrq bpf_stats_enabled kexec_load_limit_reboot panic_on_rcu_stall sched_deadline_period_min_us tainted cad_pid keys panic_on_unrecovered_nmi sched_energy_aware task_delayacct cap_last_cap kptr_restrict panic_on_warn sched_itmt_enabled threads-max core_pattern max_lock_depth panic_print sched_rr_timeslice_ms timer_migration core_pipe_limit max_rcu_stall_to_panic perf_cpu_time_max_percent sched_rt_period_us traceoff_on_warning core_uses_pid modprobe perf_event_max_contexts_per_stack sched_rt_runtime_us tracepoint_printk ctrl-alt-del modules_disabled perf_event_max_sample_rate sched_schedstats unknown_nmi_panic dmesg_restrict msgmax perf_event_max_stack sched_util_clamp_max unprivileged_bpf_disabled domainname msgmnb perf_event_mlock_kb sched_util_clamp_min unprivileged_userns_clone ftrace_dump_on_oops msgmni perf_event_paranoid sched_util_clamp_min_rt_default user_events_max ftrace_enabled msg_next_id pid_max seccomp usermodehelper hardlockup_all_cpu_backtrace ngroups_max poweroff_cmd sem version hardlockup_panic nmi_watchdog print-fatal-signals sem_next_id warn_limit hostname ns_last_pid printk shmall watchdog hung_task_all_cpu_backtrace numa_balancing printk_delay shmmax watchdog_cpumask hung_task_check_count numa_balancing_promote_rate_limit_MBps printk_devkmsg shmmni watchdog_thresh hung_task_check_interval_secs oops_all_cpu_backtrace printk_ratelimit shm_next_id yama hung_task_panic oops_limit printk_ratelimit_burst shm_rmid_forced hung_task_timeout_secs osrelease pty softlockup_all_cpu_backtrace

Slide 60

Slide 60 text

ϨΠϠʔΛԼΓͳ͍ͱ؍࡯͸Ͱ͖ͳ͍ ΞϓϦέʔγϣϯ ϥΠϒϥϦ ϑϨʔϜϫʔΫ 04Χʔωϧ ϋʔυ΢ΣΞ ϛυϧ΢ΣΞ ݴޠॲཧܥ 7. ࠓͳʹΛͯ͠Δ͔͸ 7.ʹ͔͠෼͔Βͳ͍ αΠΫϧ਺͸ ϋʔυ΢ΣΞࢧԉ͕ ͳ͍ͱऔΕͳ͍ 42-ͷ࣮ߦܭը͸ %#.4ʹ͔͠෼͔Βͳ͍ ਖ਼֬ͳ࣌ؒ͸ Χʔωϧ͔͠ଌΕͳ͍

Slide 61

Slide 61 text

ʮܭଌʯ͸ϨΠϠʔΛ·͙ͨܳज़ w ͋Δ૚ͷ͜ͱΛਫ਼៛ʹ஌ΔͨΊʹɺΑΓԼ૚ʹજΔʜʜ w ਂ͘ɺਂ͘ʜʜ w ͜͏͍ͬͨςΫχοΫͷ૊Έ߹ΘͤͰܭଌπʔϧ͸࡞ΒΕ͍ͯΔ

Slide 62

Slide 62 text

ܭଌ ԿΛܭଌ͢Δ͔ ͲͷΑ͏ʹܭଌ͢Δ͔ ݁ՌΛͲ͏ධՁ͢Δ͔

Slide 63

Slide 63 text

ܭଌ ͍ͭܭଌ͢Δ͔ ԿΛܭଌ͢Δ͔ ͲͷΑ͏ʹܭଌ͢Δ͔ ݁ՌΛͲ͏ධՁ͢Δ͔ ηοτ

Slide 64

Slide 64 text

ʮ͍ͭʯܭଌ͢Δ͔ɺͦͯ͠Ͳ͏ධՁ͢Δ͔ w ͜͜·Ͱɺ໰୊͕͋Δ৔߹ʹɺ͍͔ʹʮܭଌʯͯ͠ ݪҼʹഭΔ͔ͷ࿩Λ͖ͯͨ͠ w ͔͠͠ɺͦΕΛʮ͍ͭʯߦ͏΂͖͔ʁ w ܭଌπʔϧɾϓϩϑΝΠϥ͸͜ͷࣔࠦΛ༩͑ͯ͘Εͳ͍

Slide 65

Slide 65 text

ʮ͍ͭʯΛओ؍ʹґଘͤ͞ͳ͍ w ʮͳΜ͔஗͍ʯΛओ؍Ͱ൑அ͢Δͱɺج४͕ϒϨΔ w *46$0/ͰৗʹܭଌΛഭΒΕΔͷ͸ɺ ৗʹʮͳΜ͔஗͍ʯঢ়ଶͰ͋ΔԾఆ͕͓͔ΕΔ͔Β w γεςϜͷॏཁͳύϑΥʔϚϯεࢦඪΛࣄલʹఆٛͯ͠ΈΑ͏

Slide 66

Slide 66 text

ओ؍ʹґଘ͠ͳ͍ఆٛ w γεςϜͷύϑΥʔϚϯεϨϕϧͷ໨ඪΛఆٛ͢Δ w ϫʔΫϩʔυͷੑ࣭͔Βఆٛ͢Δɿܾࡁ·Ͱͷ౸ୡ཰ w γεςϜϝτϦΫε͔Βఆٛ͢Δɿ$16࢖༻཰͕OҎԼ w TPPO4-04-*

Slide 67

Slide 67 text

ϝτϦΫεɺ͋Δ͍͸ͦͷઌ΁ w ϝτϦΫε͸ʮ͍͔ͭΒʯ ʮ͍ͭ·Ͱʯͷఆٛʹ࢖͍΍͍͢ w FHʮϨεϙϯελΠϜͷQ͕ NTΛ௒͍͑ͯͳ͍ঢ়ଶΛਖ਼ৗ ͱ͢Δʯ

Slide 68

Slide 68 text

ϝτϦΫεɺ͋Δ͍͸ͦͷઌ΁ w ϝτϦΫε͸ʮ͍͔ͭΒʯ ʮ͍ͭ·Ͱʯͷఆٛʹ࢖͍΍͍͢ w FHʮϨεϙϯελΠϜͷQ͕ NTΛ௒͍͑ͯͳ͍ঢ়ଶΛਖ਼ৗ ͱ͢Δʯ ͜ΕͬͯܭଌͰ͸ʁ

Slide 69

Slide 69 text

ৗʹʮܭଌʯ͍ͯ͠Δ͜ͱͷՁ஋ w /FX3FMJD΍%BUBEPHͳͲͷ"1.͸ɺ ʮৗʹʯܭଌ͍ͯ͠Δ͜ͱ͕࠷େͷՁ஋ w ͜ͷจ຺Ͱ$POUJOVPVT1SP fi MJOHͳͲ΋ۙ೥ ൃలΛݟ͍ͤͯΔ w 1ZSPTDPQFFUD w ࠓ·Ͱ͸ʮॏްʯͳιϦϡʔγϣϯͩͬͨϓϩϑΝΠϦϯάΛ ϞχλϦϯάͷΑ͏ʹ࢖͑Δͱ͍͍͔΋͠Ε·ͤΜͶ

Slide 70

Slide 70 text

࠷ޙʹ w ύϑΥʔϚϯεվળ͸ɺਖ਼͍͠ࢹ఺Λ୳͢͜ͱ w ਪଌ΋͢Δ΂͖ͩ͠ɺܭଌ΋͢Δ΂͖ w ଟ͘ͷࢹ఺Λ࣋ͯΔͱɺଟ͘ͷਪଌ͕Ͱ͖Δ w ଟ͘ͷਪଌ͕Ͱ͖Δͱɺਖ਼͍͠ԾઆʹͨͲΓண͚ΔՄೳੑ͕ߴ͘ͳΔ w ͻͱͭͷ͜ͱʹৄ͍͚ͩ͠Ͱ͸উͯͳ͍ɻશ෦஌Ζ͏ͱ͢Δͱ໘ന͍

Slide 71

Slide 71 text

ʮܭଌʯ͸৺ҙؾ͚ͩͰ͸Ͳ͏ʹ΋ͳΒͳ͍ ͢΂ͯΛ஌Δؾ࣋ͪͰ΍͍ͬͯ͘

Slide 72

Slide 72 text

PTZPZVc:"1$)BLPEBUF ϓϩϑΝΠϥ։ൃऀͱݟΔ ʮਪଌ͢ΔͳɺܭଌͤΑʯ

Slide 73

Slide 73 text

No content

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

%BJTVLF"SJUPNP PTZPZV ϓϩϑΝΠϥ࡞ऀͷۤ೰

Slide 76

Slide 76 text

ຊฤͰ͢ ͜ΕΛ࿩ͨ͢ΊʹੵΈॏͶ͖ͯͨ w ຊฤͰ͢

Slide 77

Slide 77 text

QQ!PTZPZV w ͜Μʹͪ͸ʂ w גࣜձࣾεϚʔτόϯΫۈ຿ w 3VCZ͍͖ͩ͢ ࢀՃऀʂൃදऀʂεϙϯαʔʂ શ෦ืूதʂ

Slide 78

Slide 78 text

ʮܭଌͤΑʯਓ͸ͦ͏ݴ͏͚ΕͲʜʜ

Slide 79

Slide 79 text

ਖ਼͍͠ʮܭଌʯπʔϧ࡞Δͷɺ ͱͬͬͬͬͬͬͬͯ΋೉͍͠ʂʂʂʂʂʂ

Slide 80

Slide 80 text

ϓϩϑΝΠϥ͕ύϑΥʔϚϯεΛ࿪ΊΔ໰୊ ͜Ε͸Α͘஌ΒΕ͍ͯ·͢Ͷ w ϓϩϑΝΠϥΛڬΉͱɺॲཧ͕૿͑Δ w ͜Ε͸ݪཧతʹճආෆՄೳ w ॲཧ͕૿͑Δͱɺܭଌ͕࿪ΊΒΕΔ w LOPXOBT؍࡯ऀޮՌ

Slide 81

Slide 81 text

؍࡯ऀޮՌͱ޲͖߹͏ w ਖ਼֬Ͱ͋ΔͨΊʹ͸৘ใΛͨ͘͞ΜूΊ͍ͨ w ৘ใΛͨ͘͞ΜूΊΔͱΦʔόʔϔου͕େ͖͘ͳΓɺਖ਼֬Ͱͳ͘ͳΔ w ࠔͬͨʜʜɻ

Slide 82

Slide 82 text

ͪΌΜͱʮܭଌʯ͠Α͏ w ϓϩϑΝΠϥΛಋೖͨ࣌͠ͷύϑΥʔϚϯε௿ԼΛ ϕϯνϚʔΫ͢Δ w ໨ඪΛઃఆ্ͨ͠Ͱ w ୯ͳΔBWFSBHFϕʔεͷධՁͰ͸ͳ͘ w Ծઆݕఆ Uݕఆ ͯ͠ΈΔ

Slide 83

Slide 83 text

໨ඪPWFSIFBEҎ಺ w ϓϩϑΝΠϥΛೖΕͯ΋ɺϓϩάϥϜ͕Ҏ্஗͘ͳΒͳ͍ w ଟ෼େৎ෉ w 1G͸ϓϩάϥϜΛҎ্஗͘͠·ͤΜ

Slide 84

Slide 84 text

ଞʹ΋͜Μͳ೰Έ͕ w ଟ͘ͷύϑΥʔϚϯεπʔϧ͸୯Ұͷ໨తͷͨΊʹ࡞ΒΕ͍ͯΔ w TUSBDF JPTUBU GSFF TBS UPQ w UPQͱ͔͸ͦ͏Ͱ΋ͳ͍͔΋ w ϓϩϑΝΠϥ͸ɺԿΛٻΊΒΕ͍ͯΔ͔෼͔Βͳ͍ʂʂʂ

Slide 85

Slide 85 text

͜ͷεϥΠυɺ֮͑ͯ·͔͢

Slide 86

Slide 86 text

͜ͷεϥΠυɺ֮͑ͯ·͔͢ Ռͨͯ͜͠ΕͰྑ͍ͷͩΖ͏͔ʜʜ

Slide 87

Slide 87 text

ϓϩϑΝΠϥ͸͙͢ΕͨܭଌύοέʔδͰ͋Δ΂͖ ͦ͏৴͍ͯ͡·͢ w ʮܭଌʯʹؔ͢Δ޿ൣͳ஌͕ࣝͳ͍ਓͰ΋ w ͱΓ͋͑ͣΠϯετʔϧ͢Ε͹ w ϓϩάϥϜͷ࣮ߦʹؔ͢Δྑ͍ࣔࠦΛ༩͑ͯ͘ΕΔπʔϧͰ͋ͬͯ΄͍͠ w ʮ͋͊ɺ($ͷ͜ͱ΋ؾʹ͠ͳ͍ͱ͍͚ͳ͍Μͩʯ w ʮ͋͊ɺ3VCZͰ͸ෳ਺ͷεϨου͸ಉ࣌ʹಈ࡞Ͱ͖ͳ͍Μͩʯ w 6OLOPXO6OLOPXOTΛͳ͘͢πʔϧʹͳΓ͍ͨ

Slide 88

Slide 88 text

Զ͸ͳʹΛσϑΥϧτʹ͢Ε͹ʜʜ w 'MBNFHSBQIΛग़͢ͷ͕͍͍ͷ͔ʁ w 'MBNFHSBQI͕ສೳͰͳ͍͜ͱ͸஌͍ͬͯΔʜʜ w ϝιουҰཡΛදࣔ͢Δͱ͖ɺݺͼग़͠ճ਺ͱ૯࣮ߦ࣌ؒͷ ͲͪΒͰιʔτ͓ͯ͘͠΂͖ʁ w ͲͪΒ͕༗ҙ͔ٛ͸৔߹ʹΑͬͯҧ͏ʜʜ

Slide 89

Slide 89 text

Զ͸ͳʹΛσϑΥϧτʹ͢Ε͹ʜʜ w 'MBNFHSBQIΛग़͢ͷ͕͍͍ͷ͔ʁ w 'MBNFHSBQI͕ສೳͰͳ͍͜ͱ͸஌͍ͬͯΔʜʜ w ϝιουҰཡΛදࣔ͢Δͱ͖ɺݺͼग़͠ճ਺ͱ૯࣮ߦ࣌ؒͷ ͲͪΒͰιʔτ͓ͯ͘͠΂͖ʁ w ͲͪΒ͕༗ҙ͔ٛ͸৔߹ʹΑͬͯҧ͏ʜʜ 🙃

Slide 90

Slide 90 text

͜ͷεϥΠυɺ֮͑ͯ·͔͢

Slide 91

Slide 91 text

ͭ·Γ3VCZϓϩϑΝΠϥ͸3VCZͰ͸࡞Εͳ͍ িܸͷਅ࣮ w 3VCZͰ͸3VCZͷ͜ͱΛ۱ʑ·Ͱ஌Δ͜ͱ͸Ͱ͖ͳ͍͔Βʜʜ w ࠷௿ݶ7.ͷڠྗ͸͍Δ w ʮ͍·ԿΛ࣮ߦͯ͠ΔʁʯΛ׬શʹ೺ѲͰ͖Δͷ͸7.͚ͩ w

Slide 92

Slide 92 text

ͭ·Γ$Ͱ࣮૷͢Δ͜ͱʹ w ݁ہ3VCZͷ͜ͱΛ஌ΔͨΊʹɺ$3VCZॲཧܥͷϨϕϧʹ߱Γͯ $Λॻ͘͜ͱʹͳ͍ͬͯΔ w ࣮ࡍ͸3VTUΛ࢖ͬͯ·͕͢ w Ͳ͏ͯ͠ʜʜ w $ࣗ਎ͷϓϩϑΝΠϧͰ΋ࣄ৘͸มΘΒͳ͍ɻQFSG͸ͭԼͷϨΠϠʔʹ ͋ͨΔ-JOVYΧʔωϧͷػೳͱ࣮ͯ͠૷͞Ε͍ͯΔ

Slide 93

Slide 93 text

ϓϩϑΝΠϥͷਖ਼͠͞ͷอূ w ϓϩϑΝΠϥΛ࡞Γ·͢ w ͦΕͬΆ͍݁Ռ͕ग़·͢ w ͓͓ɺͳΜ͔ɺͦΕͬΆ͍ʜʜ w ͦΕͬΆ͍͕ʜʜ w ͜Εͬͯɺຊ౰ʹɺਖ਼͍͠ʁ

Slide 94

Slide 94 text

"ਖ਼͘͠ͳ͍ ݱ࣮͸ඇ৘Ͱ͋Δ w ϓϩϑΝΠϥ͸ݪཧతʹඇܾఆత w ͋ΔϓϩάϥϜͷϓϩϑΝΠϧ݁Ռ͕ ʮਖ਼͍͠ʯ͔Λςετ͢Δͷ͸ࠔ೉ w ࣮ࡍɺΊͪΌͪ͘ΌόάΔ͠ɺͦΕʹ ؾ෇͚ͳ͍ w ͩͬͯ fl BNFHSBQIͷܗͯ͠Δ͠

Slide 95

Slide 95 text

Θͨ͘͠ͷ৔߹ w ଞͷϓϩϑΝΠϥͱ౴͑߹ΘͤΛ͍ͯ͠Δ w ·ͬͨ͘ํࣜͷҧ͏ϓϩϑΝΠϥɺ۩ମతʹ͸QFSGͱൺֱ͍ͯ͠Δ w ͱͯ΋ۤ௧Ͱ͋Δ

Slide 96

Slide 96 text

QFSGͰऔΕΔελοΫ $ϨϕϧͷελοΫ rb_hash_new() rb_vm_exec() vm_exec_core() rb_main() main() __libc_start_main() 1GͰऔΕΔελοΫ 3VCZϨϕϧͷελοΫ Hash#new() foo() w ౰ͨΓલ͕ͩɺશવରԠ͠ͳ͍ w ؤுͬͯ໨ࢹ͢ΔͳΓɺ؆୯ͳεΫϦϓτΛ ॻ͍ͨΓ w ΢ιΛ͔ͭͳ͍ϓϩϑΝΠϥ΁ͷಓ͸ԕ͍

Slide 97

Slide 97 text

ۤ೰͸͋Δ͕ɺͦΕͰ΋ɺ໘ന͍ w ϓϩϑΝΠϥΛ࡞Δͱɺීஈ͔͍ͭͬͯΔݴޠ΍γεςϜ΁ͷཧղ͕ ͘͢͝ਂ·Δ w ஌Ε͹஌Δ΄Ͳɺ஌Βͳ͍͜ͱ͕૿͍͑ͯ͘ w 1GΛ࡞Γ࢝Ίͨ͜ͱͰɺ$3VCZͷ͜ͱʹৄ͘͠ͳͬͨɺͱࢥ͏

Slide 98

Slide 98 text

ύϑΥʔϚϯεΤϯδχΞϦϯά w ίϯϐϡʔλʹؔ͢Δ޿ൣͳ஌ࣝΛࢼ͞ΕΔ w ͜Ε΄Ͳ໘ന͍෼໺͸ͳ͍ w νϡʔχϯά͕όονϦܾ·Δͱؾ࣋ͪྑ͍

Slide 99

Slide 99 text

ʮૣ͗͢Δ࠷దԽ͸ॾѱͷࠜݯʯ ͱ͸ݴ͏΋ͷͷ

Slide 100

Slide 100 text

ʮૣ͗͢Δ࠷దԽ͸ॾѱͷࠜݯʯ ͱ͸ݴ͏΋ͷͷ w ͸΍͍͜ͱ͸͍͍͜ͱ w ࠷దԽ΋͸΍͍ํ͕͍͍ͷͰ͸ʁ w ͸΍͘࠷దԽ͖ͯ͠·͠ΐ͏

Slide 101

Slide 101 text

PTZPZVc:"1$)BLPEBUF ϓϩϑΝΠϥ։ൃऀͱݟΔ ʮਪଌ͢ΔͳɺܭଌͤΑʯ