On 2024-01-21 02:59, Alan Mackenzie wrote: > I don't think the first patch is correct. With it applied, the code > no longer signals the error of a symbol with position being processed > when symbols_with_pos_enabled is false. That's in the debug build, of > course. Oh, I think I see what you mean: although the patch is correct when callers use XSYMBOL correctly, if a caller has a bug that causes it to call XSYMBOL on a symbol-with-position when symbols_with_pos_enabled is false, then because of the patch this bug in the caller won't be diagnosed by an eassert failure within XSYMBOL in a debug build. I installed the attached to try to fix that. This patch doesn't affect regular builds and so should preserve the minor performance advantage on regular builds. >> When I built with --enable-checking this seemed to help significantly on >> Ubuntu 23.10 x86-64 with GCC 13.2 -O2 (at least looking at the machine >> code; I didn't benchmark). This depends on compiler and platform so it'd >> be helpful if Stefan could try it out on his machine and see whether it >> helps his cases' performance. > > The "significantly" here means the 0.4% speed up in the default build > that you mention in the first patch, does it? Actually I meant the debug build, where I didn't measure the speedup and just looked at a bit of machine code. But as Stefan mentioned there were still issues there. I hope my recent patch to builtin_lisp_symbol has fixed that. I hope this set of patches speeds things up enough on debug builds that Stefan can get his work done. If not, there are other easserts we can tune or remove. (Or perhaps it'd be cheaper to buy Stefan a faster machine - I know I could use one....)