Associated revisions

:putobject insn (of regexp) will be used instead of :toregexp insn.
This means that the regexp won't be compiled for everySimpleScanner#scan call.

It may not be a good idea to apply this kind of optimization for all cases.
But I applied this because it is default scanner and used frequently and has
relatively large impact for benchmark like this:

Before
app_erb 1.023

After
app_erb 0.781

This commit fixes only the bottleneck of performance regression introduced
in r53412. For maintainability, I won't fix other small regressions like
additional overhead of method calls.

:putobject insn (of regexp) will be used instead of :toregexp insn.
This means that the regexp won't be compiled for everySimpleScanner#scan call.

It may not be a good idea to apply this kind of optimization for all cases.
But I applied this because it is default scanner and used frequently and has
relatively large impact for benchmark like this:

Before
app_erb 1.023

After
app_erb 0.781

This commit fixes only the bottleneck of performance regression introduced
in r53412. For maintainability, I won't fix other small regressions like
additional overhead of method calls.