From: Rodrigo Rosenfeld Rosas Date: 2013-02-06T23:41:36+09:00 Subject: [ruby-core:51918] Re: [ruby-trunk - Feature #7791][Feedback] Let symbols be garbage collected Em 06-02-2013 12:35, SASADA Koichi escreveu: > (2013/02/06 23:21), SASADA Koichi wrote: >> One rough idea (but not verified) is: >> >> Separated Symbols into two sets: >> (a) Symbols created by rb_intern() >> (b) Symbols created from String object (String#to_sym) > Additional consideration about performance: > > (a) is same as current performance. > > (b) takes a time. > (b-1) Additional creation time (same as String creation and a bit) > (b-2) Slowdown GC time > > I think normal programs doesn't create (b) (sorry I'm not sure about > ActiveSupport), so I think performance down doesn't affect people. > I agree that to_sym is the big problem here. I don't think using to_sym is usually considered a best practice but when you have to do that it is unlikely that you're concerned about the performance hit, don't you agree?