in reply to Re: Re (tilly) 3: XML::SAX::PurePerl Performance
in thread XML::SAX::PurePerl Performance

I don't know that much about the full internals myself, but read is supposed to maintain an internal I/O buffer. However depending on how you configure and compile Perl, and how Perl interacts with the buffering layer(s), the code path that it takes can be very slow in practice.

In particular I have seen people get [id://29807impressive speedups] before by bypassing stdio and just buffering themselves in Perl. That shouldn't be plausible, but it happened. The same code was much slower on Windows. (I don't think it would happen if you compiled Perl to use Perl's I/O layer, but that was not historically the default, and then Perl and C libraries might not cooperate properly...)

  • Comment on Re (tilly) 5: XML::SAX::PurePerl Performance