mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
_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
This commit is contained in:
parent
db4c91be27
commit
f7b0a791ca
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue