Commit 15da0ab0 authored by Vladimír Čunát's avatar Vladimír Čunát

trie_it nitpick: reduce the initial stack size

Using 2kB as start is a bit too much, and it was showing as 0.5% CPU
on malloc() called during trie_it_begin().  Let's start at 0.5 kB,
as it can grow anyway (only negligible in profile now).
parent bf55aa63
......@@ -438,8 +438,8 @@ typedef struct trie_it {
node_t* *stack; /*!< The stack; malloc is used directly instead of mm. */
uint32_t len; /*!< Current length of the stack. */
uint32_t alen; /*!< Allocated/available length of the stack. */
/*! \brief Initial storage for \a stack; it should fit in most use cases. */
node_t* stack_init[2000 / sizeof(node_t *)];
/*! \brief Initial storage for \a stack; it should fit in many use cases. */
node_t* stack_init[60];
} nstack_t;
/*! \brief Create a node stack containing just the root (or empty). */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment