-/* Restore the state saved by the last call to mp_push().
- * mp_pop() and mp_push() works as a stack so you can push more states safely. */
+/**
+ * Inlined version of @mp_restore().
+ **/
+static inline void mp_restore_fast(struct mempool *pool, struct mempool_state *state)
+{
+ if (pool->state.last[0] != state->last[0] || pool->state.last[1] != state->last[1])
+ mp_restore(pool, state);
+ else
+ {
+ pool->state = *state;
+ pool->last_big = &pool->last_big;
+ }
+}
+
+/**
+ * Restore the state saved by the last call to @mp_push().
+ * @mp_pop() and @mp_push() works as a stack so you can push more states safely.
+ **/