Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Tomoki Ota ʲGoݴޠʳrange
Slide 2
Slide 2 text
Goʹɺdowhileͳ͘ for͔͠ଘࡏ͠ͳ͍ɻ
Slide 3
Slide 3 text
rangeͱʁ ͷίϐʔ rangeͷධՁ rangeʹ͓͚ΔϙΠϯλ ΞδΣϯμ 3
Slide 4
Slide 4 text
rangeͱʁ
Slide 5
Slide 5 text
rangeͱʁ 5 ༷ʑͳσʔλߏʹରͯ͠ɺ෮ॲཧΛߦ ͏ͷʹศརͳํ๏ ΠϯσοΫεऴྃঢ়ଶΛѻ͏ඞཁ͕ͳ͍
Slide 6
Slide 6 text
rangeͱʁ 6 range͕͍͔ʹͯ͠ΛׂΓͯΔ͔Λ͍ͬͯͳ͍ͱ όάΛى͜͢ݪҼͱͳΓ͔Ͷͳ͍ʂ
Slide 7
Slide 7 text
จࣈྻ ྻ ྻͷϙΠϯλ εϥΠε Ϛοϓ ड৴νϟωϧ rangeͰ͑Δσʔλߏ
Slide 8
Slide 8 text
rangeͷ͍ํ
Slide 9
Slide 9 text
rangeͷ͍ํ
Slide 10
Slide 10 text
rangeͷ͍ํ
Slide 11
Slide 11 text
for _ := range s {} ίϯύΠϧΤϥʔ = Λ͓͏ʂ rangeͷ͍ํ
Slide 12
Slide 12 text
ͷίϐʔ
Slide 13
Slide 13 text
ͷίϐʔ 13 [{1100} {1200} {1300}]ʹͳΒͳ͍ʂ
Slide 14
Slide 14 text
GOͰೖ͞ΕΔͷ શͯίϐʔͰ͋Δ
Slide 15
Slide 15 text
ͷίϐʔ 15 ߏମΛฦؔ͢ͷ݁ՌΛೖ͢Δͱɺͦͷߏମͷίϐʔ͕ߦΘΕΔ ϙΠϯλΛฦؔ͢ͷ݁ՌΛೖ͢ΔͱɺϝϞϦΞυϨεͷίϐʔ͕ߦΘΕΔ (64bitΞʔΩςΫνϟͰΞυϨε64bitͱͳΔɻ)
Slide 16
Slide 16 text
ͷίϐʔ 16 εϥΠεͷΠϯσοΫεΛ༻͍ͯཁૉʹΞΫηε͢Δ ैདྷͷfor range ϙΠϯλΛ༻͢Δ
Slide 17
Slide 17 text
εϥΠεͷΠϯσοΫεΛ༻͍ͯཁૉʹΞΫηε͢Δ ैདྷͷfor 17
Slide 18
Slide 18 text
εϥΠεͷΠϯσοΫεΛ༻͍ͯཁૉʹΞΫηε͢Δ range 18
Slide 19
Slide 19 text
ϙΠϯλΛ༻͢Δ 19
Slide 20
Slide 20 text
ϙΠϯλΛ༻͢Δ 20 εϥΠεܕΛมߋ͢Δඞཁ͕͋Δ͕ɺৗʹՄೳͱݶΒͳ͍ ੑೳΛॏࢹ͢Δ߹ɺϙΠϯλͷεϥΠεΛ෮ॲཧ͢Δ͜ͱ༧ଌՄೳੑʹ͔͚ΔͨΊ CPUʹͱͬͯޮ͕ѱ͘ͳΔՄೳੑ͕͋Δ
Slide 21
Slide 21 text
rangeͷධՁ
Slide 22
Slide 22 text
rangeͷධՁ 22 range͕ࣜඞਢ
Slide 23
Slide 23 text
23 for i, v := range exp rangeͷධՁ
Slide 24
Slide 24 text
24 rangeͷධՁ
Slide 25
Slide 25 text
25 rangeͷධՁ
Slide 26
Slide 26 text
26 rangeͷධՁ rangeΛͬͨ࣌ʹ༩͑ΒΕ͕ͨࣜ ։࢝લʹ1͚ͩධՁ͞ΕΔɻ srange͕͏Ұ࣌มʹίϐʔ͞ΕΔɻ
Slide 27
Slide 27 text
27 rangeͷධՁ(νϟωϧ) rangechΛධՁͯ͠ɺҰ࣌มʹίϐʔ͠ɺ ͦͷνϟωϧͷཁૉʹରͯ͠ɺ෮ॲཧΛߦ͏ɻ ch = ch2ʹؔΘΒͣɺrangech2Ͱͳ͘ ch1ʹରͯ͠ɺ෮ॲཧΛଓ͚Δɻ ch = ch2ɺchʹ2ͭͷνϟωϧΛೖ͍ͯ͠ΔͷͰɺ ͜ͷίʔυͷޙͰclose(ch)Λݺͼग़͢ͱɺ1ͭͰͳ͘ɺ 2ͭͷνϟωϧ͕Ϋϩʔζ͞ΕΔɻ
Slide 28
Slide 28 text
28 rangeͷධՁ(ྻ)
Slide 29
Slide 29 text
29 rangeͷධՁ(ྻ)
Slide 30
Slide 30 text
30 ࠷ޙͷཁૉͷ࣮ࡍͷͷදࣔํ๏ ΠϯσοΫεΛ͏ํ๏ ྻͷϙΠϯλΛ͏ํ๏
Slide 31
Slide 31 text
31 ΠϯσοΫεΛ༻͢Δ
Slide 32
Slide 32 text
32 ྻͷϙΠϯλΛ༻͢Δ
Slide 33
Slide 33 text
rangeʹ͓͚ΔϙΠϯλ
Slide 34
Slide 34 text
rangeʹ͓͚ΔϙΠϯλ 34 ΩϟογϡʹཁૉΛૠೖ͢ΔϩδοΫΛ࣮͍ͯ͠Δ
Slide 35
Slide 35 text
35 rangeʹ͓͚ΔϙΠϯλ
Slide 36
Slide 36 text
36 rangeʹ͓͚ΔϙΠϯλ
Slide 37
Slide 37 text
37 rangeʹ͓͚ΔϙΠϯλ
Slide 38
Slide 38 text
38 ղܾํ๏1 ϩʔΧϧมΛ༻͢Δํ๏
Slide 39
Slide 39 text
39 ղܾํ๏2 εϥΠεͷΠϯσοΫεΛͬͯɺ֤ཁૉΛࢀর͢ΔϙΠϯλΛ֨ೲ͢Δํ๏