in reply to Surprisingly poor regex performance

Shouldn't
[^\n]\n
be
[^\n]*\n
I don't know if that'll help your performance problem.

This post may not have anything to do with mmap. Did you try it without using mmap?

Replies are listed 'Best First'.
Re^2: Surprisingly poor regex performance
by sgifford (Prior) on Dec 13, 2004 at 16:57 UTC
    Thanks; I tried several versions, and at some point lost my *. Putting it back in didn't help performance at all, though. And I agree it has nothing at all to do with mmap; that's just a convenient way of getting a 400K scalar variable with interesting contents.