On 29.03.2008 18:03, s.ross wrote:
proper design and / or algorithms make a huge difference.
Yes, “controlled”. And yes, a good algo beats a machine optimization
almost every time. But still, some of the stupid optimization tricks
people have traditionally used for the last several percent destroy
the readability of code. I’ve never been terribly unhappy with the
performance of Ruby, but if I were … say … Industrial Light and
Magic and choosing between Ruby and Python to glue my effects stuff
together, I might be swayed toward Python because it preserves
bytecode (right?).
I am not sure what you mean by “preserve bytecode”.
It might be nice, once we figure out how to express
Ruby in an optimizable bytecode to create JIT optimizers that are
platform specific. Who knows what results that might yield.
There is JRuby already. IMHO this is a good way to go because a lot of
engineering went into JVM’s already and that way Ruby can benefit from
that without having to invest the same effort into the VM.
My original point, spelling not withstanding, is that this is a topic
(along with threading) that typically gets relegated to the premature
optimizations bin, and doesn’t rise to the level of “this should be
possible one day and it should work with only the predictable
glitches.” If I were heavily invested in my Java or C programming
skills, and wanted to keep Ruby out of my shop – and there are people
who do fight to keep new technologies away – lack of optimization
might be an attack plan.
I guess even with such optimizations Ruby will never come close in
performance to C and maybe even not to Java because of the highly
dynamic nature. OTOH, if explicit enabling of certain optimizations
disables some of the dynamic features that might be ok…
Again, just my opinion.
No problem with that. I just wanted to make the half serious point that
there is indeed a lot of room for programmer controlled optimization
that does not need -O3. 
Kind regards
robert