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

JITをたどるとそこはYARVの中

 JITをたどるとそこはYARVの中

Tsukasa OISHI

June 21, 2019
Tweet

More Decks by Tsukasa OISHI

Other Decks in Technology

Transcript

  1. def fib(num) if num < 2 num else fib(num -

    2) + fib(num - 1) end end
  2. 2 3 * 4 5 * + ελοΫ 6 4

    PUSH 2 PUSH 3 MUL PUSH 4
  3. 2 3 * 4 5 * + ελοΫ 6 4

    5 PUSH 2 PUSH 3 MUL PUSH 4 PUSH 5
  4. 2 3 * 4 5 * + ελοΫ 6 20

    PUSH 2 PUSH 3 MUL PUSH 4 PUSH 5 MUL
  5. 2 3 * 4 5 * + ελοΫ 26 PUSH

    2 PUSH 3 MUL PUSH 4 PUSH 5 MUL ADD
  6. 2 3 * 4 5 * + ελοΫ 2 3

    putobject 2 putobject 3
  7. 2 3 * 4 5 * + ελοΫ 6 putobject

    2 putobject 3 opt_mult mid:*, argc:1
  8. 2 3 * 4 5 * + ελοΫ 6 4

    putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4
  9. 2 3 * 4 5 * + ελοΫ 6 4

    5 putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5
  10. 2 3 * 4 5 * + ελοΫ 6 20

    putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1
  11. 2 3 * 4 5 * + ελοΫ 26 putobject

    2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1
  12. 2 3 * 4 5 * + ελοΫ 26 putobject

    2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject 5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ
  13. putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject

    5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7.
  14. putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject

    5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7.
  15. putobject 2 putobject 3 opt_mult mid:*, argc:1 putobject 4 putobject

    5 opt_mult mid:*, argc:1 opt_plus mid:+, argc:1 όΠτίʔυ :"37 3VCZ7. ϋʔυ΢ΣΞͰ͸ͳ͘ ιϑτ΢ΣΞͰԾ૝తʹ࡞ΒΕͨܭࢉػ
  16. --jit-max-cache=num Max number of methods to be JIT-ed in a

    cache (default: 1000) --jit-min-calls=num Number of calls to trigger JIT (for testing, default: 5)
  17. --jit-max-cache=num Max number of methods to be JIT-ed in a

    cache (default: 100) --jit-min-calls=num Number of calls to trigger JIT (for testing, default: 10000)