An example on some improvements of heapandstack