lib/core: Improved running time for reset