Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Monday July 28, 2003
06:27 PM

On XML::SAX::PurePerl

[ #13742 ]

One of the best talks of the YAPC::Eu 2003 was Nick Clark's talk on optimising perl without dropping down to XS code (or Inline). This covered all sorts of micro optimisations that you probably should never do, but it inspired me anyway...

So on Wednesday night I tossed and turned in bed thinking about how XML::SAX::PurePerl has a horrible design - it parses in perl by nibbling away at the document 1 character at a time. That's horribly inefficient in a language that doesn't treat strings as character arrays.

So this weekend I sat down and re-wrote XML::SAX::PurePerl. I made as much use of perl's regexp engine as I could (actually not true - I could use it more, but it would require much deeper re-design). In the end it's now about 10 times faster.

Thanks Nicholas.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.