From: Evan Phoenix Date: 2013-02-14T01:38:00+09:00 Subject: [ruby-core:52218] Re: [ruby-trunk - Feature #7791][Feedback] Let symbols be garbage collected --511bc028_579328b9_102 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline I have a worry about Koichi's approach. There are going to have to be places where (b) type Symbols are converted into (a) type Symbols. All those places will turn into DOS vectors. This is because SYMBOL_P() will have to detect both types, but calling SYM2ID() will have to convert type (b) into type (a) so that an ID can be returned. Doing a quick grep of 1.9.3-p194, I see 93 uses of SYM2ID, so all of those would have to be changed/audited as well any future uses of SYM2ID would have to be done very carefully. This is not unsurmountable, but it's something that will have to be dealt if the 2 types approach is used. -- Evan Phoenix // evan@phx.io On Thursday, February 7, 2013 at 5:35 AM, SASADA Koichi wrote: > (2013/02/07 20:25), Rodrigo Rosenfeld Rosas wrote: > > I think Koichi's approach is a better one. I don't think there are any > > needs to actually garbage collect internally used symbols like method > > names and the like. > > > > > Note that my idea is not verified. > > -- > // SASADA Koichi at atdot dot net > > --511bc028_579328b9_102 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I have a worry about Koichi's approach. There are goi= ng to have to be places where (b) type Symbols are converted into (a) typ= e Symbols. All those places will turn into DOS vectors. This is because S= YMBOL=5FP() will have to detect both types, but calling SYM2ID() will hav= e to convert type (b) into type (a) so that an ID can be returned.

Doing a quick grep of 1.9.3-p19= 4, I see 93 uses of SYM2ID, so all of those would have to be changed/audi= ted as well any future uses of SYM2ID would have to be done very carefull= y.

This is not unsurmountable, but it's somethin= g that will have to be dealt if the 2 types approach is used.

-- 
Evan Phoenix // evan=40ph= x.io

=20

On Thursday, =46ebruar= y 7, 2013 at 5:35 AM, SASADA Koichi wrote:

(2013/02/07 20:25), Rodrigo Rose= nfeld Rosas wrote:
I think K= oichi's approach is a better one. I don't think there are any
n= eeds to actually garbage collect internally used symbols like method
names and the like.

Not= e that my idea is not verified.

--
//= SASADA Koichi at atdot dot net
=20 =20 =20 =20
=20

--511bc028_579328b9_102--