Indeed, I modified the macroexpanded form into:
(cl-block nil
(let* ((--cl-var-- (number-sequence 0 130000))
i
pairs
pairs-end)
(while (consp --cl-var--)
(setq i (car --cl-var--))
(let ((v (list (cons (number-to-string i) i))))
(if (null pairs-end)
(setq pairs v pairs-end (last pairs))
(setq pairs-end (setcdr pairs-end v))))
(setq --cl-var-- (cdr --cl-var--)))
(length pairs)))
and it runs near instantaneously.
I'd guess the fix would be applied in `cl--parse-loop-clause`? Perhaps Stefan could give some pointers?