From: Christian Szegedy Date: 2001-05-16T00:05:47+09:00 Subject: [ruby-talk:15168] Re: Discussion on new Ruby features > def g(x : X) > Object.const_set("X", Y) # now X is Y > f(x) > end > > But of course, you would normally don't do it and there should be no problem with it. The optimizer must reconginze this situation, and should not optimize this. It was not an algorithm, just a hint. > You may also look at r2c (Ruby to C compiler) or there is a JIT for Ruby. > But both are for 1.4.6 and I don't think they are really usable. > Or maybe you just wait until matz releases the bytecode-compiler for Ruby :-) I haven't tried them, but, according to the postings, they don't seem to fit optimization purposes. Basically, I don't think that too much optimization is possible without giving the compiler some hints... My hope is that I can get into some fruitful discussion with Matz on this topic. Best regards, Christian