On Fri, Jan 03 2025, Helmut Eller wrote: [...] > I'm not sure if those differences are acceptable. I also have no good > idea how to reduce it, except inserting more calls to maybe_quit. It seems that calling maybe_quit before and after calling functions would cure this problem. With the original maybe_quit restored, as in the attached patch, the foo example looks so: 1986 100% main 1986 100% record-samples 1986 100% foo 1214 61% float-time Compared to the original 1074 54% float-time that seems pretty ok. Also the bar example 812 80% animate-place-char 6 0% window-start 29 2% beginning-of-line 29 2% delete-char 6 0% undo-auto-amalgamate 36 3% insert-char 390 38% move-to-column 11 1% undo-auto--undoable-change looks quite good to me. WDYT?