From 1b8bb2df51067b2123a92c63bdbed03389c036b8 Mon Sep 17 00:00:00 2001 From: Nickolas Lloyd Date: Sun, 1 Jan 2017 14:02:26 -0500 Subject: [PATCH] ; 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. --- src/bytecode-jit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }, -- 2.39.5