Project

General

Profile

Actions

Feature #9441

closed

[PATCH] method.h: save 8 bytes in rb_method_definition_t on x86-64

Added by normalperson (Eric Wong) almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Assignee:
-
Target version:
[ruby-core:59993]

Description

Rearranging the struct to have two 32-bit values next to each other
allows the struct to be one word smaller on 64-bit.

This lowers overall memory use as we have many methods out-of-the box:

$ /usr/bin/time ./ruby -e exit
0.06user 0.00system 0:00.07elapsed 98%CPU (0avgtext+0avgdata 7420maxresident)k
0inputs+0outputs (0major+1930minor)pagefaults 0swaps
$ /usr/bin/time ./ruby -e exit
0.06user 0.00system 0:00.07elapsed 98%CPU (0avgtext+0avgdata 7372maxresident)k
0inputs+0outputs (0major+1918minor)pagefaults 0swaps


The following changes since commit 06d2e8aaf7fe60a09245963f2f69feb5685db8f0:

thread/thread.c: no dup (2014-01-22 06:59:41 +0000)

are available in the git repository at:

git://80x24.org/ruby.git mdefsize

for you to fetch changes up to 3fcf1bf57d99482e9882fc8d5b3348da799c41c5:

method.h: save 8 bytes in rb_method_definition_t on x86-64 (2014-01-22 20:41:17 +0000)


Eric Wong (1):
method.h: save 8 bytes in rb_method_definition_t on x86-64

method.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


Files

Updated by Anonymous almost 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r44686.


  • method.h: rearrange rb_method_definition_struct to save 8 bytes in
    padding on 64 bit platforms. Patch by Eric Wong.

    [Feature #9441] [ruby-core:59993]

Actions

Also available in: Atom PDF

Like0
Like0