development fork of ruby/ruby
Перейти к файлу
Peter Zhu 87bc5da60a Don't immediately promote children of old objects
[Feature #19678]

References from an old object to a write barrier protected young object
will not immediately promote the young object. Instead, the young object
will age just like any other object, meaning that it has to survive
three collections before being promoted to the old generation.
References from an old object to a write barrier unprotected object will
place the parent object in the remember set for marking during minor
collections. This allows the child object to be reclaimed in minor
collections at the cost of increased time for minor collections.

On one of [Shopify's highest traffic Ruby apps, Storefront
Renderer](https://shopify.engineering/how-shopify-reduced-storefront-response-times-rewrite),
we saw significant improvements after deploying this feature in
production. We compare the GC time and response time of web workers that
have the original behaviour (non-experimental group) and this new
behaviour (experimental group). We see that with this feature we spend
significantly less time in the GC, 0.81x on average, 0.88x on p99, and
0.45x on p99.9.

This translates to improvements in average response time (0.96x) and p99
response time (0.92x).
2023-10-31 20:36:18 -07:00
.github merge revision(s) 833b32f503abb9712dbb3a6825b1730c8ee1e912,1dde9d726099fc4e4b06b8c848c85eac195c521b: 2023-07-16 11:46:12 +09:00
basictest
benchmark
bin
bootstraptest merge revision(s) 31e67a476f2262e01a0829e8ab5e6d8a97e0724e,0b95cbcbde8875effdbcbb676cb0a7f751a1d4c1: [Backport #19601] 2023-07-17 17:21:51 +09:00
ccan
coroutine
coverage
cygwin
defs
doc
enc merge revision(s) 2c8f2871a8aeff592369a993b1d69557160cfa61: [Backport #19532] 2023-07-22 13:31:34 +09:00
ext Fix cvar caching when class is cloned 2023-07-01 14:17:30 +09:00
gems
include merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
internal YJIT: Make ratio_in_yjit always available 2023-07-27 14:55:24 -07:00
lib Merge URI-0.12.2 for Bundler 2023-07-01 13:46:09 +09:00
libexec
man Change heap init environment variable names 2023-10-30 14:24:43 -07:00
misc
missing
sample
spec merge revision(s) 9c94db7cfc584e982a6449b72e58a1cf25024177,fe4d906f5fbacbe6e9267af3bd3503339bad63a9: [Backport #19774] 2023-07-22 14:01:55 +09:00
template
test Don't immediately promote children of old objects 2023-10-31 20:36:18 -07:00
tool merge revision(s) f6adc5be94a9f70a5b9897b81dabdeb49b573393,bccdc041665032b819fab1c04ed4dbdfeeeb366b: [Backport #19582] 2023-07-17 09:54:51 +09:00
wasm
win32
yjit YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609) 2023-08-23 14:42:58 -07:00
.appveyor.yml
.cirrus.yml merge revision(s) 7c9ce38cdb781958c52a89b910ee83d5fea99048: 2023-07-16 23:30:43 +09:00
.dir-locals.el
.document
.editorconfig
.gdbinit
.git-blame-ignore-revs
.gitattributes
.gitignore
.indent.pro
.rdoc_options
.rspec_parallel
.travis.yml
BSDL
CONTRIBUTING.md
COPYING
COPYING.ja
GPL
KNOWNBUGS.rb
LEGAL
NEWS.md
README.EXT
README.EXT.ja
README.ja.md
README.md
aclocal.m4
addr2line.c
addr2line.h
array.c
array.rb
ast.c
ast.rb
autogen.sh
bignum.c
builtin.c
builtin.h
class.c Fix cvar caching when class is cloned 2023-07-01 14:17:30 +09:00
common.mk Fix cvar caching when class is cloned 2023-07-01 14:17:30 +09:00
compar.c
compile.c
complex.c
configure.ac merge revision(s) 038f9ade3c4d965415e4956561975454cf9eeb21: [Backport #19585] 2023-07-22 13:32:30 +09:00
constant.h
cont.c
darray.h
debug.c
debug_counter.c
debug_counter.h
dir.c
dir.rb
dln.c
dln.h
dln_find.c
dmydln.c
dmyenc.c
dmyext.c
encindex.h
encoding.c
enum.c
enumerator.c
error.c
eval.c merge revision(s) 02a7e12b80823919fb614ad3ea6241d5115d14fe: [Backport #19593] 2023-07-17 16:09:00 +09:00
eval_error.c merge revision(s) 9c94db7cfc584e982a6449b72e58a1cf25024177,fe4d906f5fbacbe6e9267af3bd3503339bad63a9: [Backport #19774] 2023-07-22 14:01:55 +09:00
eval_intern.h
eval_jump.c
file.c
gc.c Don't immediately promote children of old objects 2023-10-31 20:36:18 -07:00
gc.h
gc.rb
gem_prelude.rb
golf_prelude.rb
goruby.c
hash.c merge revision(s) 8c360ce713f57d4177de833297364f6f6d950420: [Backport #19589] 2023-07-17 14:21:39 +09:00
hrtime.h
id_table.c
id_table.h
inits.c
insns.def
internal.h
io.c merge revision(s) 0b2613f44309bddae45562c9f3a14ed43e56959b: [Backport #19640] 2023-07-22 13:03:22 +09:00
io.rb
io_buffer.c merge revision(s) bd786e78969f9d4a8699376ceafe10934b6ad533: [Backport #19084] 2023-07-16 16:50:13 +09:00
iseq.c
iseq.h
kernel.rb
lex.c.blt
load.c
loadpath.c
localeinit.c
main.c
marshal.c
marshal.rb
math.c
memory_view.c
method.h
mini_builtin.c
miniinit.c
mjit.c
mjit.h
mjit.rb
mjit_c.c
mjit_c.h
mjit_c.rb
nilclass.rb
node.c
node.h
numeric.c
numeric.rb
object.c merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
pack.c
pack.rb
parse.y merge revision(s) 91c004885fc75a93cadf0094fa86ec3bd0ec25f5: [Backport #19025] 2023-07-22 11:55:49 +09:00
prelude.rb
probes.d
probes_helper.h
proc.c
process.c
ractor.c merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
ractor.rb
ractor_core.h
random.c
range.c merge revision(s) 1a149aab776aa6741628eb35482eff1ded197fd2,fb17c833f542222afdf482924877d43aa577782d,60f22ebf86248388b41b4ec751d16700f2b4b621: [Backport #19533] 2023-07-17 16:07:39 +09:00
rational.c
re.c merge revision(s) a8ba1ddd78544b4bda749051d44f7b2a8a0ec5ff: [Backport #19455] 2023-07-17 17:23:31 +09:00
regcomp.c
regenc.c
regenc.h
regerror.c
regexec.c merge revision(s) fac814c2dc31afef272b45392a7389ef0bfa3a4f: [Backport #19602] 2023-07-22 11:48:47 +09:00
regint.h merge revision(s) fac814c2dc31afef272b45392a7389ef0bfa3a4f: [Backport #19602] 2023-07-22 11:48:47 +09:00
regparse.c
regparse.h
regsyntax.c
ruby-runner.c
ruby.c
ruby_assert.h
ruby_atomic.h
rubystub.c
scheduler.c merge revision(s) 466aa8010fb49f9ec6c78ea1de4e8ca0965f4fdf: [Backport #19546] 2023-07-16 16:44:22 +09:00
shape.c
shape.h merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
signal.c
siphash.c
siphash.h
sparc.c
sprintf.c
st.c merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
strftime.c
string.c merge revision(s) bc3ac1872e4523334e3ed04c2bb70a55c4c43f98: [Backport #19748] 2023-07-22 13:39:44 +09:00
string.rb
struct.c
symbol.c
symbol.h
symbol.rb
thread.c merge revision(s) 0402193723647b8c4f57b1453fe2192ad2788d12: [Backport #19709] 2023-07-22 13:08:16 +09:00
thread_none.c
thread_none.h
thread_pthread.c
thread_pthread.h
thread_sync.c
thread_sync.rb
thread_win32.c
thread_win32.h
time.c merge revision(s) 5d4fff845602872eef072e7611558b5f8762efe0: [Backport #19293] 2023-07-23 12:20:12 +09:00
timev.h merge revision(s) a84c99468f26a9f79fec57926d561ed906505eac: [Backport #19575] 2023-07-17 09:45:57 +09:00
timev.rb
trace_point.rb
transcode.c
transcode_data.h
transient_heap.c
transient_heap.h
util.c
variable.c merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
variable.h
version.c
version.h merge revision(s) 5d4fff845602872eef072e7611558b5f8762efe0: [Backport #19293] 2023-07-23 12:20:12 +09:00
vm.c YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609) 2023-08-23 14:42:58 -07:00
vm_args.c merge revision(s) 3874381c4483ba7794ac2abf157e265546f9bfa7: [Backport #19759] 2023-07-23 12:01:21 +09:00
vm_backtrace.c
vm_callinfo.h
vm_core.h
vm_debug.h
vm_dump.c
vm_eval.c merge revision(s) 537183cd2ac0163851277b46a2f21ea5914c11c0: [Backport #19577] 2023-07-17 09:50:10 +09:00
vm_exec.c YJIT: Make ratio_in_yjit always available 2023-07-27 14:55:24 -07:00
vm_exec.h
vm_insnhelper.c merge revision(s) 54dbd8bea8a79bfcdefa471c1717c6cd28022f33: [Backport #19535] 2023-07-22 13:24:55 +09:00
vm_insnhelper.h YJIT: Make ratio_in_yjit always available 2023-07-27 14:55:24 -07:00
vm_method.c merge revision(s) 537183cd2ac0163851277b46a2f21ea5914c11c0: [Backport #19577] 2023-07-17 09:50:10 +09:00
vm_opts.h
vm_sync.c
vm_sync.h
vm_trace.c
vsnprintf.c
warning.rb
yjit.c YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609) 2023-08-23 14:42:58 -07:00
yjit.h YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609) 2023-08-23 14:42:58 -07:00
yjit.rb YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609) 2023-08-23 14:42:58 -07:00

README.md

Actions Status: MinGW Actions Status: MJIT Actions Status: Ubuntu Actions Status: Windows AppVeyor status Travis Status Cirrus Status

What is Ruby?

Ruby is an interpreted object-oriented programming language often used for web development. It also offers many scripting features to process plain text and serialized files, or manage system tasks. It is simple, straightforward, and extensible.

Features of Ruby

  • Simple Syntax
  • Normal Object-oriented Features (e.g. class, method calls)
  • Advanced Object-oriented Features (e.g. mix-in, singleton-method)
  • Operator Overloading
  • Exception Handling
  • Iterators and Closures
  • Garbage Collection
  • Dynamic Loading of Object Files (on some architectures)
  • Highly Portable (works on many Unix-like/POSIX compatible platforms as well as Windows, macOS, etc.) cf. https://github.com/ruby/ruby/blob/master/doc/maintainers.rdoc#label-Platform+Maintainers

How to get Ruby with Git

For a complete list of ways to install Ruby, including using third-party tools like rvm, see:

https://www.ruby-lang.org/en/downloads/

The mirror of the Ruby source tree can be checked out with the following command:

$ git clone https://github.com/ruby/ruby.git

There are some other branches under development. Try the following command to see the list of branches:

$ git ls-remote https://github.com/ruby/ruby.git

You may also want to use https://git.ruby-lang.org/ruby.git (actual master of Ruby source) if you are a committer.

How to build

see Building Ruby

Ruby home page

https://www.ruby-lang.org/

Documentation

Mailing list

There is a mailing list to discuss Ruby. To subscribe to this list, please send the following phrase:

subscribe

in the mail body (not subject) to the address ruby-talk-request@ruby-lang.org.

Copying

See the file COPYING.

Feedback

Questions about the Ruby language can be asked on the Ruby-Talk mailing list or on websites like https://stackoverflow.com.

Bugs should be reported at https://bugs.ruby-lang.org. Read "Reporting Issues" for more information.

Contributing

See "Contributing to Ruby", which includes setup and build instructions.

The Author

Ruby was originally designed and developed by Yukihiro Matsumoto (Matz) in 1995.

matz@ruby-lang.org