Upgrade to Pro — share decks privately, control downloads, hide ads and more …

わかった気になる、Coroutine1.7.0のチャンネルのパフォーマンス向上

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

 わかった気になる、Coroutine1.7.0のチャンネルのパフォーマンス向上

Avatar for RyuNen344

RyuNen344

May 13, 2023
Tweet

More Decks by RyuNen344

Other Decks in Technology

Transcript

  1. ࿩͢͜ͱɾ࿩͞ͳ͍͜ͱ • ࿩͢͜ͱ • چ࣮૷ɾ৽࣮૷ͷҧ͍ • ;ΜΘΓͱͨ͠Lock freeपΓͷ࿩ • ࿩͞ͳ͍͜ͱ

    • Lock freeपΓͷఆٛతʹਖ਼͍͠ղઆ • kumagi͞Μͷࢿྉ͕ͱͯ΋ษڧʹͳΓ·͢ • https://www.docswell.com/s/kumagi/ZP99EQ-lock-free • Ktor౳ͷ3rd PartyϥΠϒϥϦ΁ͷӨڹ
  2. ͳͥ࠶࣮૷ #1 • σʔλߏ଄͸Concurrent Double Linked List • ͦ΋ͦ΋ޡͬͨཧ࿦Λݩʹ࣮ͯ͠૷ •

    อकੑͷ໰୊ • ઢܗԽՄೳੑͷ໰୊ • ૢ࡞͕ஞ࣮࣍ߦ͞Ε͍ͯΔ͜ͱͷอূ
  3. ͳͥ࠶࣮૷ #2 • ࣮૷͕ෳࡶʹͳ͍ͬͯͯbyte code size, dex sizeʹѱӨڹ • DCAS,

    N-word CASͰ࣮૷ • ֦ுੑɺਖ਼֬ੑɺύϑΥʔϚϯεʹ೉͕͋Δ • CASɿCompare And Swap જࡏతͳσʔλڝ߹ͷ໰୊͕ൃੜͨ͠৔߹ͷਪଌͱमਖ਼Λࠔ೉ʹ͍ͯͨ͠