in reply to Re: Fast lookup for prefixes in hash
in thread Fast lookup for prefixes in hash

I think that will probably be a whole lot slower than a (few) hash lookup(s) unless you optimize the regex like is dicussed in this thread: SAS log scanner

        - tye (but my friends call me "Tye")
  • Comment on (tye)Re: Fast lookup for prefixes in hash

Replies are listed 'Best First'.
Re: (tye)Re: Fast lookup for prefixes in hash
by japhy (Canon) on Oct 31, 2001 at 21:12 UTC
    I'm well aware of that optimization necessity. I'm putting it in my book somewhere.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      Of course if you ever rewrite the regexp engine, you know what optimization will make the need for manually optimizing that regexp completely not needed...

      (Can I bribe you into trying? :-)

        You can stand by my side with a barf bag and/or the necessary drugs to program and debug the optimization. ;) I'd like to try it, when I get the time.

        _____________________________________________________
        Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
        s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;