tests/README
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 09 Mar 2017 11:54:25 -0800
changeset 31476 08ecec297521
parent 26421 4b0fc75f9403
permissions -rw-r--r--
bdiff: use Python memory allocator in fixws Python has its own memory allocation APIs. For allocations <= 512 bytes, it allocates memory from arenas. This means that average small allocations don't call the system allocator, which makes them faster. Also, arena allocations cut down on memory fragmentation, which can matter for performance in long-running processes. Another advantage of using the Python memory allocator is that allocations are tracked by Python. This is a bigger deal in Python 3, as modern versions of Python have some decent built-in tools for examining memory usage, leaks, etc. This patch converts a trivial malloc() + free() in the bdiff code to use the Python allocator APIs. Since the object being operated on is a line, chances are it will use an arena. So, this could have a net positive impact on performance (although I didn't measure it).

To run the tests, do:

cd tests/
python run-tests.py

See https://mercurial-scm.org/wiki/WritingTests for
more information on writing tests.