Faster stack implementation