At 07:34 PM 11/25/2001 -0800, Brent Dax wrote: >Dan Sugalski: ># I realize that benchmarking the RE engine's a pain, what with ># no GC so we ># leak until we blow memory and die, but... ># ># I'd like to take a series of regexes that exercise various bits of the ># perl 5 engine and time them against the equivalent perl 6 RE ># code. I think ># it's important at this point to see where we stand relative to the ># benchmark standard, to see whether this is even worth doing ># from a speed ># standpoint. (I really, really hope so, but...) ># ># When we've a reasonably comparable engine then I think it'll ># be time to ># write the text->opcode compiler so we can start turning ># scalar variables ># and suchlike things into regexes. > >There's a big problem with that: Perl 5's regex compiler, pregcomp. > >Perl 5's REs will always appear faster because Perl 5 has an >intelligent, optimizing regex compiler.
I'm reasonably certain you can beat perl 5's regex compiler if you try. :) Seriously, the benchmarks I want first are for a hand-rolled version of the regex in the proposed parrot re ops. Feel free to optimize as you see fit for this as long as the optimizations are something a reasonable optimizer would make. What I really want to know is whether using ops to do regexes is feasable. After that we'll work on programmatically generating the op stream. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk