Readable code is better than efficient code
ashlan.com
ashlan.com
All the better if that refactoring is in a FOSS application/library to save other people the repeat effort (and potentially gather further improvements).
Your question reminded me of Raymond Hettinger's excellent 2015 PyCon talk about refactoring functional-but-messy Python code: https://www.youtube.com/watch?v=wf-BqAjZb8M
(as previously discussed on HN: https://news.ycombinator.com/item?id=10023818)