|
From: | Paul Eggert |
Subject: | Re: emacs-26 eec71eb: Speed up replace-buffer-contents |
Date: | Tue, 3 Jul 2018 23:36:44 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Eli Zaretskii wrote:
If you mean you have an idea for calling rarely_quit or its equivalent in a more elegant way (e.g., without a static counter), then it would be good, of course.
Yes, that's the idea.
Which particular problem were did you allude to?
Sorry, I've lost context and don't know what this question refers to.
It could be that the optimized build will show a different picture, although I doubt that. I might try an optimized build in a couple of days (but I never use -O3 in Emacs, only -O2).
Yes, -O2 is what I usually use for benchmarks too, since it's what is normally used in production. Its execution profile can differ quite a bit from -O0, due to inlining and other things. For rarely_quit, with -O2 typically the overhead of the rarely_quit call (including computing its argument) is typically just two CPU instructions (a test and a conditional branch that is predicted correctly, so both instructions are cheap). This is way better than -O0.
[Prev in Thread] | Current Thread | [Next in Thread] |