LearnProgramming/libastar — pull request #13 by jgulotta (2012-12-20 01:47:28+00:00)
Title: Use HeapSet, a combination set and priority queue

Solves #4

HeapSet allows a basic heap interface while maintaining only one copy of the state in the heap.
If a state is inserted more than once, the better is kept.

Memory use went down for larger search spaces after introducing this set.
Memory use went up for smaller search spaces, which should be
investigated.

Small 2x2
---
Before: total heap usage: 118 allocs, 118 frees, 48,803 bytes allocated
After: total heap usage: 130 allocs, 130 frees, 49,379 bytes allocated

Medium 3x3
---
Before: total heap usage: 26,761 allocs, 26,761 frees, 2,335,947 bytes allocated
After: total heap usage: 23,740 allocs, 23,740 frees, 2,009,883 bytes
allocated