diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 13:32:11 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-12 13:32:11 +0000 |
commit | f7b0a791caaa7c16da4c0afccfde4eaf107e0104 (patch) | |
tree | 4b672a1dbe14093144d322dfce0ba0d87b143739 /tool | |
parent | db4c91be27389a9a97ea2181b8640fa7e080bdec (diff) | |
download | ruby-f7b0a791caaa7c16da4c0afccfde4eaf107e0104.tar.gz |
_mjit_compile_pc_and_sp.erb: forget about memcpy [ci skip]
because using memcpy here actually made performance worse.
In Optcarrot,
* for loop
fps: 55.90428960597268
fps: 57.21690379342434
fps: 58.41751168279789
fps: 58.7317470613203
fps: 62.81371000202459
fps: 63.02541045417479
fps: 63.77324026366317
fps: 65.48067818347447
fps: 66.02324323831398
fps: 66.3816048847424
fps: 66.54526488660156
* memcpy
fps: 54.98389812126847
fps: 57.96524857391357
fps: 57.974918725327946
fps: 58.285987089087364
fps: 58.639003211333225
fps: 59.03244214601948
fps: 59.89964772199603
fps: 60.809490242786175
fps: 62.462070790624146
fps: 62.534599002918306
fps: 63.787312566163756
That's probably because the copied size is very small.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb index 08aeaee69f..eff728f551 100644 --- a/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb +++ b/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb @@ -21,7 +21,7 @@ rb_snum_t i, push_size; push_size = -<%= insn.call_attribute('sp_inc') %> + <%= insn.rets.size %> - <%= insn.pops.size %>; fprintf(f, " reg_cfp->sp = (VALUE *)reg_cfp->bp + %ld + 1;\n", push_size); /* POPN(INSN_ATTR(popn)); */ - for (i = 0; i < push_size; i++) { /* TODO: use memcpy? */ + for (i = 0; i < push_size; i++) { fprintf(f, " *(reg_cfp->sp + %ld) = stack[%ld];\n", i - push_size, (rb_snum_t)b->stack_size - push_size + i); } } |