Project

General

Profile

Actions

Bug #9159

closed

[patch] use rb_fstring for internal strings

Added by tmm1 (Aman Karmani) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 2.1.0dev (2013-11-26 trunk 43852)
[ruby-core:58599]

Description

I added rb_fstring wrappers around internal strings generated by iseqs, regexps and eval:

https://github.com/tmm1/ruby/commit/9587fae171835ccf013661ba837f097754f170ef

In our rails app, this reduces the number of long-lived strings on the heap by 30%.

  $ ruby -rconfig/environment -e' GC.start; p ObjectSpace.count_objects[:T_STRING] '
  246100

  $ ruby -rconfig/environment -e' GC.start; p ObjectSpace.count_objects[:T_STRING] '
  173956

If this patch is acceptable, I can commit it. make test and test-all pass.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #8148: [patch] reduce allocations due to __FILE__ and {class,module}_evalRejectedtmm1 (Aman Karmani)03/22/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0