[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...

Issue #11420 has been reported by Koichi Sasada.

11 messages 2015/08/06

[ruby-core:70547] [Ruby trunk - Bug #9079] [Feedback] Interpolated Symbol creates unnecessary intermediate String on the heap

From: ko1@...
Date: 2015-08-22 15:04:52 UTC
List: ruby-core #70547
Issue #9079 has been updated by Koichi Sasada.

Status changed from Open to Feedback

----------------------------------------
Bug #9079: Interpolated Symbol creates unnecessary intermediate String on the heap
https://bugs.ruby-lang.org/issues/9079#change-53954

* Author: Yehuda Katz
* Status: Feedback
* Priority: Normal
* Assignee: Koichi Sasada
* ruby -v: ruby 2.0.0p343 (2013-10-31) [x86_64-linux]
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN
----------------------------------------
This case:

  x = "world"
  y = :"hello#{world}!"

allocates one T_STRING according to ObjectSpace.count_objects. Since all of the concatenation happens as part of the symbol generation, it shouldn't be necessary to create a Ruby string.



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

In This Thread

Prev Next