Add a PCBuild8 build directory for building with Visual Studio .NET 2005. Contains a special project to perform profile guided optimizations on the pythoncore.dll, by instrumenting and running pybench.py
Fredrik Lundh [Sat, 27 May 2006 10:39:48 +0000 (10:39 +0000)]
needforspeed: backed out the Py_LOCAL-isation of ceval; the massive in-
lining killed performance on certain Intel boxes, and the "aggressive"
macro itself gives most of the benefits on others.
Neal Norwitz [Sat, 27 May 2006 05:18:57 +0000 (05:18 +0000)]
Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code looked duplicated, I wonder if a utility function could help reduce the duplication here.)
set_exc_info(), reset_exc_info(): By exploiting the
likely (who knows?) invariant that when an exception's
`type` is NULL, its `value` and `traceback` are also NULL,
save some cycles in heavily-executed code.
This is a "a kronar saved is a kronar earned" patch: the
speedup isn't reliably measurable, but it obviously does
reduce the operation count in the normal (no exception
raised) path through PyEval_EvalFrameEx().
The tim-exc_sanity branch tries to push this harder, but
is still blowing up (at least in part due to pre-existing
subtle bugs that appear to have no other visible
consequences!).
Andrew Dalke [Fri, 26 May 2006 19:02:09 +0000 (19:02 +0000)]
substring split now uses /F's fast string matching algorithm.
(If compiled without FAST search support, changed the pre-memcmp test
to check the last character as well as the first. This gave a 25%
speedup for my test case.)
Rewrote the split algorithms so they stop when maxsplit gets to 0.
Previously they did a string match first then checked if the maxsplit
was reached. The new way prevents a needless string search.
Steve Holden [Fri, 26 May 2006 18:26:21 +0000 (18:26 +0000)]
Revert tests to MAL's original round sizes to retiain comparability
from long ago and far away. Stop calling this pybench 1.4 because it
isn't. Remove the empty test, which was a bad idea.
Georg Brandl [Fri, 26 May 2006 18:03:31 +0000 (18:03 +0000)]
Need for speed: Patch #921466 : sys.path_importer_cache is now used to cache valid and
invalid file paths for the built-in import machinery which leads to
fewer open calls on startup.
Also fix issue with PEP 302 style import hooks which lead to more open()
calls than necessary.
Steve Holden [Fri, 26 May 2006 17:41:32 +0000 (17:41 +0000)]
Use minimum calibration time rather than avergae to avoid
the illusion of negative run times. Halt with an error if
run times go below 10 ms, indicating that results will be
unreliable.
Steve Holden [Fri, 26 May 2006 16:27:59 +0000 (16:27 +0000)]
Add -t option to allow easy test selection.
Action verbose option correctly.
Tweak operation counts. Add empty and new instances tests.
Enable comparisons across different warp factors. Change version.
Tim Peters [Fri, 26 May 2006 14:02:05 +0000 (14:02 +0000)]
Explicitly close files. I'm trying to stop the frequent spurious test_tarfile
failures on Windows buildbots, but it's hard to know how since the regrtest
failure output is useless here, and it never fails when a buildbot slave runs
test_tarfile the second time in verbose mode.
Andrew Dalke [Fri, 26 May 2006 14:00:45 +0000 (14:00 +0000)]
Changes to string.split/rsplit on whitespace to preallocate space in the
results list.
Originally it allocated 0 items and used the list growth during append. Now
it preallocates 12 items so the first few appends don't need list reallocs.
("Here are some words ."*2).split(None, 1) is 7% faster
("Here are some words ."*2).split() is is 15% faster
(Your milage may vary, see dealership for details.)
File parsing like this
for line in f:
count += len(line.split())
is also about 15% faster. There is a slowdown of about 3% for large
strings because of the additional overhead of checking if the append is
to a preallocated region of the list or not. This will be the rare case.
It could be improved with special case code but we decided it was not
useful enough.
There is a cost of 12*sizeof(PyObject *) bytes per list. For the normal
case of file parsing this is not a problem because of the lists have
a short lifetime. We have not come up with cases where this is a problem
in real life.
I chose 12 because human text averages about 11 words per line in books,
one of my data sets averages 6.2 words with a final peak at 11 words per
line, and I work with a tab delimited data set with 8 tabs per line (or
9 words per line). 12 encompasses all of these.
Also changed the last rstrip code to append then reverse, rather than
doing insert(0). The strip() and rstrip() times are now comparable.
Ronald Oussoren [Fri, 26 May 2006 12:23:20 +0000 (12:23 +0000)]
- Remove previous version of the binary distribution script for OSX
- Some small bugfixes for the IDLE.app wrapper
- Tweaks to build-installer to ensure that python gets build in the right way,
including sqlite3.
- Updated readme files
Ronald Oussoren [Fri, 26 May 2006 11:43:26 +0000 (11:43 +0000)]
Integrate installing a framework in the 'make install'
target. Until now users had to use 'make frameworkinstall'
to install python when it is configured with '--enable-framework'.
This tends to confuse users that don't hunt for readme files
hidden in platform specific directories :-)
Ronald Oussoren [Fri, 26 May 2006 11:38:39 +0000 (11:38 +0000)]
- Search the sqlite specific search directories
after the normal include directories when looking
for the version of sqlite to use.
- On OSX:
* Extract additional include and link directories
from the CFLAGS and LDFLAGS, if the user has
bothered to specify them we might as wel use them.
* Add '-Wl,-search_paths_first' to the extra_link_args
for readline and sqlite. This makes it possible to
use a static library to override the system provided
dynamic library.
Fredrik Lundh [Fri, 26 May 2006 11:29:39 +0000 (11:29 +0000)]
needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.