Project

General

Profile

Actions

Feature #15305

open

[PATCH] include/ruby/ruby.h (RB_ALLOCV*): remove GC guard

Added by normalperson (Eric Wong) about 6 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-core:89805]

Description

include/ruby/ruby.h (RB_ALLOCV*): remove unnecessary GC guard

At least I'm not seeing how it's necessary, as it defeats
optimization at allocation time (instead of protecting the
VALUE from being GC-ed)

Anyways, there's a measurable size reduction:

text           data     bss     dec     hex filename

3535061 21232 72944 3629237 3760b5 ruby.before
3534141 21232 72944 3628317 375d1d ruby.after

I also don't get the point of using atomics in rb_free_tmp_buffer;
but that's a separate issue...


Files

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

LGTM.
It might be a result by trial&error.

Updated by normalperson (Eric Wong) about 6 years ago

wrote:

https://bugs.ruby-lang.org/issues/15305#change-74878

LGTM.
It might be a result by trial&error.

OK, r65744

Any comment about the atomics in rb_free_tmp_buffer? Thanks.

I also don't get the point of using atomics in rb_free_tmp_buffer;
but that's a separate issue...

Actions #3

Updated by hsbt (Hiroshi SHIBATA) over 3 years ago

  • Tracker changed from Misc to Feature
Actions #4

Updated by hsbt (Hiroshi SHIBATA) 8 months ago

  • Status changed from Open to Assigned
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0