]> git.pond.sub.org Git - empserver/commit
Permit disabling of A* path cache at compile-time
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 19 Feb 2011 14:00:03 +0000 (15:00 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 12 Apr 2011 19:40:08 +0000 (21:40 +0200)
commita02d3e9fc17b17af720f60c5dbd0639c8858481d
tree49e02ca100df6edcd82c6ae65d5b71ea5636b2bf
parent0385c67a8fce0c17c341364cc340428de08c8b45
Permit disabling of A* path cache at compile-time

Mostly to measure its effectiveness.  Compile with AS_NO_PATH_CACHE
defined to disable it.

Turns out the path cache is quite effective.  For my continental test
case (Hvy Metal 2 updates), it reduces the number of searches by a
factor of 18.5, speeding up distribution path assembly by a factor of
7.  The price is memory: it uses 135 times more memory than the A*
library.  For my island test case (Hvy Plastic 2 updates), I get 4
times search reduction, 3.5 times faster distribution path assembly,
36 times more memory.
src/lib/common/path.c