From: Nickolas Lloyd Date: Sun, 1 Jan 2017 19:02:26 +0000 (-0500) Subject: ; Fix a performance regression in bytecode JIT compiler X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1b8bb2df51067b2123a92c63bdbed03389c036b8;p=emacs.git ; Fix a performance regression in bytecode JIT compiler ; * src/bytecode-jit.c: Make `functions' array static const to allow the compiler to elide the array accesses. This brings `jit_byte_code__' performance back in line with the more explicit, repetitive pre-639dfad3ae2a478652a399986b03e5eec219eab1 version. --- diff --git a/src/bytecode-jit.c b/src/bytecode-jit.c index 859df8b7c42..6ab73492195 100644 --- a/src/bytecode-jit.c +++ b/src/bytecode-jit.c @@ -781,7 +781,7 @@ struct { void * const ptr; const char * const name; int n; -} functions[256] = { +} static const functions[256] = { #undef DEFINE_FIXED #define DEFINE_FIXED(bname, value, fname, num) \ [value] = { .ptr = (void *)(&fname), .name = #fname, .n = num },