]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix a performance regression in bytecode JIT compiler
authorNickolas Lloyd <ultrageek.lloyd@gmail.com>
Sun, 1 Jan 2017 19:02:26 +0000 (14:02 -0500)
committerNickolas Lloyd <ultrageek.lloyd@gmail.com>
Sun, 1 Jan 2017 19:02:26 +0000 (14:02 -0500)
; * 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.

src/bytecode-jit.c

index 859df8b7c4288e42353a6517b313bb4b2918f904..6ab73492195c741daedf26cc577069c3f81ab252 100644 (file)
@@ -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 },