[Python-Dev] Revising RE docs

Stephen J. Turnbull stephen at xemacs.org
Thu Sep 1 04:52:22 CEST 2005


>>>>> "Michael" == Michael Chermside <mcherm at mcherm.com> writes:

    Michael> (2) is what we have today, but I would prefer (1) to
    Michael> gently encourage people to use the precompiled objects
    Michael> (which are distinctly faster when re-used).

Didn't Fredrik Lundh strongly imply that implicitly compiled objects
are cached?  That's a pretty big speed up right there.

Sure, the precompiled objects are faster because you don't have to
find them.  But you could have string objects (or a derivative) grow a
"compiled_regexp" attribute internally.  Then if you have a random
regexp you think you might have used elsewhere, just intern it.  (NB,
wild guess, here, I don't know enough about current implementation to
know if this is a reasonable extension.)

    Michael> Does anyone else think we ought to swap that around in
    Michael> the documentation?  I'm not trying to assign more work to
    Michael> Fred... but if there were a python-dev consensus that
    Michael> this would be desirable, then perhaps someone would be
    Michael> encouraged to supply a patch.

+1.  I won't have time for some weeks, but I'd already flagged
Barry's post for later consideration.  I hope that doesn't stop
somebody else from picking up the ball, though.


-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.


More information about the Python-Dev mailing list