タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

rubyとJITに関するtuto0621のブックマーク (2)

  • 天泣記

    2018-02-04 (Sun)#1 mjit を試したruby に mjit がマージされたというので、あからさまに効くだろう例を作って試してみた。 % ./ruby -v --jit -e ' def m(a) i = 0 b = 0 while i < 10000000 b += a i += 1 end b end 40.times { t1 = Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID) m 1 t2 = Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID) t = t2 - t1 p ["*"*(t*100), t] } ' ruby 2.6.0dev (2018-02-04 trunk 62205) [x86_64-linux] ["*********

    tuto0621
    tuto0621 2018/02/05
    “ruby に mjit がマージされた”
  • mrubyのJIT

    バイトコード列の例 irep 0x20160790 nregs=11nlocals=4 pools=3 syms=5 reps=1 file: benchmark/bm_fib.rb 14 000 OP_ENTER 2:0:0:0:0:0:0 15 001 OP_LOADSELF R4 15 002 OP_STRING R5 L(0) ; "" 15 003 OP_GETCONST R6 :Irep 15 004 OP_MOVE R7 R1 ; R1:ele 15 005 OP_GETUPVAR R8 1 0 15 006 OP_SEND R6 :disasm 2 15 007 OP_STRCAT R5 R6 15 008 OP_STRING R6 L(2) ; " n" 15 009 OP_STRCAT R5 R6 15 010 OP_SEND R4 :print 1 16 011 OP

    mrubyのJIT
  • 1