Charles Oliver Nutter pisze:
> Luc Heinrich wrote:
>> On 23 nov. 08, at 05:27, Stephen Bannasch wrote:
>>
>>> So far I've only tested rexml on ruby 1.9 but was surprised to find 
>>> it about 13% slower than ruby 1.8.6.
>>
>> REXML uses regular expressions for parsing and regular expressions 
>> are known to be slower in 1.9, as far as I know.
>
> Why is that? JRuby uses a port of Oniguruma for all regexp support, 
> and our performance is fine.
>
> - Charlie
>
It's an additional huge String overhead itself (not just Regexp) and 
encoding/quoting/sanity checks before the string buffer will actually go 
to regex engine (i.e. more complex: rb_reg_prepare_enc, rb_reg_quote, 
rb_reg_check_preprocess, unescape_unicode_list, unescape_nonascii). 
JRuby will also experience a slowdown here, though it wont be that 
dramatic (eventually zero overhead for cache intensive regexps, 1.9 has 
only a last entry cache so it doesn't work here very well).

Marcin