From: Robert Klemme Date: 2008-06-01T21:04:42+09:00 Subject: Re: Huge performance gap On 01.06.2008 03:14, Charles Oliver Nutter wrote: > Roger Pack wrote: >> Maybe something is possible along the lines of >> >> vm_optimized :no_frame_pointer, :fast_math, :no_thread_checkpointing do >> # some code that should run very fast >> end >> >> :) >> Thanks for your work :) >> -R > > Yeah, I'm looking into those possibilities, trying to find a > nonintrusive way to introduce compiler pragmas that we could use for > implementing parts of JRuby in Ruby code (or that others could use). For > example, something like this (a bogus name...I don't want to reveal any > pragmas yet): > > def foo > ____NO_FRAMING = true > end That's an interesting idea, but I'd rather separate Ruby code from platform specific options. So I'd prefer command line arguments to the engine (as you presented before) or a smart mechanism to store switches externally (e.g. .rc file). Ideally there would even be a mechanism that finds optimal switches automatically, but I guess that would be really hard. :-) Kind regards robert