Function: profiler-format-number
profiler-format-number is a byte-compiled function defined in
profiler.el.gz.
Signature
(profiler-format-number NUMBER)
Documentation
Format NUMBER in human readable string.
Source Code
;; Defined in /usr/src/emacs/lisp/profiler.el.gz
(defun profiler-format-number (number)
"Format NUMBER in human readable string."
(if (and (integerp number) (> number 0))
(cl-loop with i = (% (1+ (floor (log number 10))) 3)
for c in (append (number-to-string number) nil)
if (= i 0)
collect ?, into s
and do (setq i 3)
collect c into s
do (cl-decf i)
finally return
(apply #'string (if (eq (car s) ?,) (cdr s) s)))
(profiler-ensure-string number)))