Slide 1

Slide 1 text

͸͡Ίͯͷ8FC"TTFNCMZ ࣲా࿨ف!TIJCF /JIPOCBTIJKT

Slide 2

Slide 2 text

σβΠφʔ / ϑϩϯτΤϯυΤϯδχΞ :BIPP+"1"/ͷ޿ࠂܥπʔϧͷ
 ϑϩϯτΤϯυΛ୲౰͍ͯ͠·͢ ࣲా ࿨ف @shibe97

Slide 3

Slide 3 text

+BWB4DSJQUେ޷͖ͬࢠͰ͢

Slide 4

Slide 4 text

͚Ͳ

Slide 5

Slide 5 text

ͪΐͬͱ๞͖ͨ

Slide 6

Slide 6 text

ͱ͍͏ΑΓ

Slide 7

Slide 7 text

3FBDU3FEVY๞͖ͨ

Slide 8

Slide 8 text

Կ͔৽͍͠΋ͷʹखΛग़ͯ͠ΈΑ͏ɾɾɾ

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

+BWB4DSJQUͷ໰୊఺

Slide 11

Slide 11 text

͍ͩͿ଎͘ͳ͚ͬͨͲɺॏ͍ॲཧʹ͸ऑ͍ʢϒϥ΢βݻ·Δʣ ܕ͕໌ࣔతͰͳ͍ ίϯύΠϧܕͰ͸ͳ͘ɺΠϯλϓϦλܕݴޠ 'JSFGPYʢ4QJEFS.POLFZʣ &EHFʢ$IBLSBʣ $ISPNFʢ7ʣ

Slide 12

Slide 12 text

ͦ΋ͦ΋͜Μͳෳࡶͳ΋ͷΛ࡞ΔͨΊʹ஀ੜͨ͠ݴޠ͡Όͳ͍ "KBYͷීٴͱڞʹαʔόαΠυͷॲཧ͕ΫϥΠΞϯταΠυʹ
 Ҡ͖ͬͯͨ͋ͨΓ͔Βແཧ͕ग़࢝Ίͨ

Slide 13

Slide 13 text

+BWB4DSJQU࣮ߦ࣌ͷྲྀΕ ϒϥ΢β͕+BWB4DSJQUͷߏจղੳΛߦ͍ɺ"45ʢ"CTUSVDU4ZOUBY 5SFFʣʹม׵ "45ΛόΠτίʔυʹม׵͠ɺԾ૝Ϛγϯ্Ͱಈ࡞ͤ͞Δ ܕ৘ใ͕ݻ·͖ͬͯͨΒɺ෦෼తʹػցޠʹม׵
 ʢ+VTUJO5JNFίϯύΠϧʣ

Slide 14

Slide 14 text

ࣄલʹܕఆ͕ٛͰ͖Ε͹ʜ

Slide 15

Slide 15 text

asm.js

Slide 16

Slide 16 text

BTNKTͬͯͲΜͳ΋ͷ .P[JMMB͕ఏএͨ͠+BWB4DSJQUͷߴ଎Խٕज़ ͋͘·Ͱ+BWB4DSJQUϑΝΠϧ ͋Δϧʔϧʹै͏ͱܕ৘ใΛ༩͑Δ͜ͱ͕Ͱ͖Δ
 ʢϒϥ΢βଆͷαϙʔτ͕΋ͪΖΜඞཁʣ

Slide 17

Slide 17 text

function AddFunctions(){ "use asm"; function add1(value){ value = value | 0; // Ҿ਺͸ int ͩͱ໌ࣔ var result = 0; // int ͱͯ͠એݴ
 result = (value + 1) | 0; // int ΁Ωϟετ return result; } return { add1: add1 } }

Slide 18

Slide 18 text

BTNKTʹΑΔҾ਺ͷܕఆٛ JOU WBMVFWBMVFc EPVCMF WBMVFWBMVF qPBU WBMVFG WBMVF

Slide 19

Slide 19 text

BTNKTͷͭΒΈ ਺஋ԋࢉ͔͠Ͱ͖ͳ͍ จࣈྻ΍ΦϒδΣΫτΛແཧ΍Γදݱ͠Α͏ͱ͢ΔͱɺόΠφϦ͕ བྷΜͰ͖ͯπϥ͍ ਓ͕ॻ͘ݴޠ͡Όͳ͍

Slide 20

Slide 20 text

ଞͷݴޠ͔Βม׵͢Ε͹ʜ

Slide 21

Slide 21 text

--7.ίϯύΠϧͷ࢓૊Έ $ $ 0CKFDUJWF$ (P 3VTU தؒݴޠ +BWB4DSJQU ͦͷଞݴޠ

Slide 22

Slide 22 text

˞+BWB4DSJQU༻ͷ--7.ϕʔείϯύΠϥ

Slide 23

Slide 23 text

ม׵͸Ͱ͖ͨɺ͔͠͠ʜ ϑΝΠϧ༰ྔ͕େ͖͍ )FMMP8PSME͚ͩͰ, BTNKT͸.P[JMMB͕ߟ͑ͨ΋ͷ͕ͩɺશϒϥ΢βϕϯμʔڠྗͯ͠ ΋ͬͱ͍ܰܗࣜ࡞ͬͪΌ͏ʁ

Slide 24

Slide 24 text

ʢXBTNʣ

Slide 25

Slide 25 text

ݱঢ়ɺXBTNʹม׵Ͱ͖Δݴޠ $ $ 3VTU

Slide 26

Slide 26 text

Α͠ɺ3VTUͩʂ

Slide 27

Slide 27 text

ͬ͘͟Γ3VTUͬͯʁ ೥όʔδϣϯϦϦʔε .P[JMMB͕։ൃ 'JSFGPY͔Β3VTUͰॻ͍ͨίʔυ͕ಈ͍͍ͯΔ ҆શੑɺฒྻੑʹ༏Ε͍ͯΔ

Slide 28

Slide 28 text

3VTUͷओͳ༻్ 4ZTUFN1SPHSBNNJOH /FUXPSL1SPHSBNNJOH ,FSOFM 8FC"TTFNCMZ

Slide 29

Slide 29 text

+BWB4DSJQU 1)1 3VCZ +BWB $ 3VTU ʢݸਓͷݟղͰ͢ʣ

Slide 30

Slide 30 text

FNTDSJQUFO +BWB4DSJQU"1* 8FC"TTFNCMZͰͷར༻ྫ index.rs index.wasm TypedArray

Slide 31

Slide 31 text

ࢼ͠ʹ3VTUͰ%0.Λు͖ग़ͤΔ͔
 ΍ͬͯΈͨ

Slide 32

Slide 32 text

XFCQMBUGPSNͱ͍͏DSBUFΛ࢖͏ /PEFͰ͍͏QBDLBHFతͳ΋ͷ

Slide 33

Slide 33 text

)5.-ͷத਎ var Module = {} fetch('index.wasm') .then((response) => response.arrayBuffer()) .then((buffer) => { Module.wasmBinary = buffer; var script = document.createElement('script'); script.src = 'index.js'; document.body.appendChild(script); })

Slide 34

Slide 34 text

σϞ

Slide 35

Slide 35 text

ͳΜ͔3FBDUDSFBUF&MFNFOU 
 ͬΆ͕͋͞Δ

Slide 36

Slide 36 text

+49తͳ΋ͷ͕͋Ε͹ ͍͍ײ͡ͳΔͷͰ͸ʁ

Slide 37

Slide 37 text

ͱࢥͬͨΒ͋ͬͨ

Slide 38

Slide 38 text

KTYSTSFBDUST

Slide 39

Slide 39 text

͚Ͳ·ͩ։ൃͷॳظஈ֊ͬΆ͍Ͱ͢

Slide 40

Slide 40 text

5PEP.7$ IUUQSVTUXFCQMBUGPSNHJUIVCJPSVTUUPEPNWD

Slide 41

Slide 41 text

·ͱΊ ͍ͭʹ+BWB4DSJQUҎ֎ͷݴޠ΋ϒϥ΢βͰಈ͔ͤΔ࣌୅ʹ 3VTU͸·ͩ8FCΞϓϦ੍࡞ʹ͸ऑ͍͕ɺࠓޙ੒௕͍ͯͬͨ͠৔߹ʹ
 ϑϩϯτΤϯυ৘੎͕มΘΔՄೳੑ͕͋Γͦ͏

Slide 42

Slide 42 text

5IBOLT 5XJUUFS(JU)VC!TIJCF