From: Michael Edgar Date: 2011-06-08T00:26:36+09:00 Subject: [ruby-core:36826] Re: [Ruby 1.9 - Feature #4845] Provide Class#cb_object_instantiated_from_literal(object) On Jun 7, 2011, at 11:19 AM, Lazaridis Ilias wrote: > I've shown my interest to look into this, but the issue was rejected immediately. > > I could look into this and could possibly provide a suggestion which has no speed trade-offs. Just please, can you point me to the relevant source code location(s)? insns.def contains the definitions of each bytecode instruction. `putstring` is used to create a string literal, at lines 375-382. It is defined as a simple call to rb_str_resurrect(), which is in string.c at line 909, which simply allocates and copies the string. You are suggesting that performing full method lookup could have no speed trade-off compared to "copy bytes." This reflects a complete disconnect with the realities of Ruby performance issues, which is why the issue was rejected immediately. If you are so sure what you wish is possible, please come back with a patch. Further discussion on this list is unnecessary, as I've pointed you directly to where your proposal could be implemented. Considering your emphasis on brevity and staying on-topic, I'm sure you understand that there is no reason to fill the list with further messages when a patch is all that is necessary to move your concerns forward at this point. Michael Edgar adgar@carboni.ca http://carboni.ca/