On Jul 8, 2008, at 10:13 PM, SASADA Koichi wrote:

> I consier this issue and current my solutions are:
>
> - enable (include) trace insn on 1.9.1 everytime
> - speed up with one-byte trace instruction on 1.9.x (x > 1)
> - you can disable to compile with trace insn by require some
>  library (ruby -r without-trace-insn ...) on 1.9.1
>  in concrete term, modify
>  RubyVM::InstructionSequence.compile_option.
> - you can write about it on performance tips page :)

Perhaps enable tracing if the -d option is given on the command line.  
Then if I say -d, I get profile results, and if I don't, they are  
ignored. Then change profile.rb to do nothing unless debug is set.  
That's rather nice, as I can then leave profiling permanently in my  
code, and it has zero impact unless I run that code with -d.


Dave