]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
A nice little speed-up for filter():
authorGuido van Rossum <guido@python.org>
Fri, 16 Aug 2002 07:04:56 +0000 (07:04 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 16 Aug 2002 07:04:56 +0000 (07:04 +0000)
commitc7903a13d2dc58d2f239a4d3bb29703199b450e4
treec58b263f9df73631be99d1e8555c93a6020581c5
parent8e829200b1ac79750224563331032de031b76288
A nice little speed-up for filter():

- Use PyObject_Call() instead of PyEval_CallObject(), saves several
  layers of calls and checks.

- Pre-allocate the argument tuple rather than calling Py_BuildValue()
  each time round the loop.

- For filter(None, seq), avoid an INCREF and a DECREF.
Python/bltinmodule.c