Guido van Rossum wrote:

> I also notice that _compile() is needlessly written as a varargs
> function -- all its uses pass it exactly two arguments.

that's because the function uses [1] the argument tuple as the cache key,
and I wanted to make the "cache hit" path as fast as possible.

(but that was back in the 1.6 days; things have changed a lot since then, so
maybe someone should benchmark some alternative ways to do this under
2.4...)

</F>

1) well, it used to use it.  the code was modified slightly in 2.3 to prepend
the type of the pattern string; not sure why, since 8-bit and unicode patterns
should be equivalent. 



_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to